| # Provide instructions for google Cloud Build to auto-build flutter |
| # dashboard to flutter-dashboard project. Auto-build will be triggered |
| # by daily schedule on `main` branch. This cloudbuild calls an additional |
| # cloudbuild configuration responsible for deployment. |
| # |
| # This job is for generating the docker image with build provenance, |
| # and the deployment job uses the generated docker image and deploys it to |
| # App Engine. |
| |
| steps: |
| # Build dashboard. |
| # This step generates the dashboard files using flutter, then moves the |
| # generated files into the app_dart folder, where a docker image is then |
| # created in the next step. |
| - name: us-docker.pkg.dev/$PROJECT_ID/flutter/flutter |
| entrypoint: '/bin/bash' |
| args: ['cloud_build/dashboard_build.sh'] |
| |
| # Build docker image |
| - name: 'us-docker.pkg.dev/cloud-builders/ga/v1/docker' |
| args: ['build', '-t', 'us-docker.pkg.dev/$PROJECT_ID/appengine/default.version-$SHORT_SHA', 'app_dart'] |
| |
| # Trigger the cloud build that deploys the docker image |
| - name: gcr.io/cloud-builders/gcloud |
| entrypoint: '/bin/bash' |
| args: |
| - '-c' |
| - |- |
| gcloud builds submit \ |
| --config app_dart/cloudbuild_app_dart_deploy.yaml \ |
| --substitutions="SHORT_SHA=$SHORT_SHA" \ |
| --async |
| |
| timeout: 1200s |
| |
| images: ['us-docker.pkg.dev/$PROJECT_ID/appengine/default.version-$SHORT_SHA'] |
| |
| # If build provenance is not generated, the docker deployment will fail. |
| options: |
| requestedVerifyOption: VERIFIED |