Przeglądaj źródła

set up buildx in ci

sunguroku 5 lat temu
rodzic
commit
696a286842

+ 4 - 0
.github/workflows/gcr.yaml

@@ -29,6 +29,10 @@ jobs:
         EOL
 
         cat ./dashboard/.env
+    - name: Set up QEMU
+      uses: docker/setup-qemu-action@v1
+    - name: Set up Docker Buildx
+      uses: docker/setup-buildx-action@v1
     - name: Build
       run: |
         DOCKER_BUILDKIT=1 docker build . -t gcr.io/porter-dev-273614/porter-prov:latest -f ./docker/dev.Dockerfile

+ 13 - 10
dashboard/src/main/home/Home.tsx

@@ -59,16 +59,19 @@ export default class Home extends Component<PropsType, StateType> {
             if (err) {
               console.log(err);
             } else if (res.data) {
-              
+
+              let viewData = [] as any[]
               // TODO: separately handle non meta-provisioning case
               res.data.forEach((el: InfraType) => {
                 if (el.status === 'creating') {
-                  this.setState({ currentView: 'provisioner', viewData: {
+                  viewData.push({
                     infra_id: el.id,
                     kind: el.kind,
-                  }});
+                  })
                 }
               });
+
+              this.setState({ currentView: 'provisioner', viewData});
             }
           });
         } else if (res.data.length === 0) {
@@ -108,7 +111,7 @@ export default class Home extends Component<PropsType, StateType> {
               setCurrentModal('ClusterConfigModal', { currentTab: 'select' });
             }}>Select Clusters</A> tab.<br /><br />
             3. For additional information, please refer to our <A>docs</A>.<br /><br /><br />
-            
+
             * Make sure all fields are explicitly declared (e.g., certs and keys).
           </Placeholder>
         </DashboardWrapper>
@@ -149,8 +152,8 @@ export default class Home extends Component<PropsType, StateType> {
     }
 
     return (
-      <Templates 
-        setCurrentView={(x: string) => this.setState({ currentView: x })} 
+      <Templates
+        setCurrentView={(x: string) => this.setState({ currentView: x })}
       />
     );
   }
@@ -158,11 +161,11 @@ export default class Home extends Component<PropsType, StateType> {
   renderSidebar = () => {
     if (this.context.projects.length > 0) {
 
-      // Force sidebar closed on first provision 
+      // Force sidebar closed on first provision
       if (this.state.currentView === 'provisioner' && this.state.forceSidebar) {
         this.setState({ forceSidebar: false });
       }
-      
+
       return (
         <Sidebar
           forceSidebar={this.state.forceSidebar}
@@ -214,8 +217,8 @@ export default class Home extends Component<PropsType, StateType> {
         {this.renderSidebar()}
 
         <ViewWrapper>
-          <Navbar 
-            logOut={this.props.logOut} 
+          <Navbar
+            logOut={this.props.logOut}
             currentView={this.state.currentView} // For form feedback
           />
           {this.renderContents()}

+ 2 - 2
dashboard/src/main/home/new-project/Provisioner.tsx

@@ -46,7 +46,7 @@ export default class Provisioner extends Component<PropsType, StateType> {
 
       ws.onmessage = (evt: MessageEvent) => {
         let event = JSON.parse(evt.data)
-        
+
         let data = event.map((msg: any) => { 
           return JSON.parse(msg["Values"]["data"])["log"]
         })
@@ -62,7 +62,7 @@ export default class Provisioner extends Component<PropsType, StateType> {
           this.setState({ logs: [err] })
         }
         
-        if (!this.state.maxStep[infra.kind]) {
+        if (!this.state.maxStep[infra.kind] && !this.state.maxStep[infra.kind]["total_resources"]) {
           this.setState({
             maxStep: {
               ...this.state.maxStep,

Plik diff jest za duży
+ 6 - 0
prov.yaml


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików