blob: 6f102209c64ab20d1c4556471148d014f9081686 [file] [log] [blame]
# 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.
# 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:$PROJECT_ID/flutter/flutter
entrypoint: '/bin/bash'
args: ['cloud_build/']
# Build docker image
- name: ''
args: ['build', '-t', '$PROJECT_ID/appengine/default.version-$SHORT_SHA', 'app_dart']
# Trigger the cloud build that deploys the docker image
- name:
entrypoint: '/bin/bash'
- '-c'
- |-
gcloud builds submit \
--config app_dart/cloudbuild_app_dart_deploy.yaml \
--substitutions="SHORT_SHA=$SHORT_SHA" \
timeout: 1200s
images: ['$PROJECT_ID/appengine/default.version-$SHORT_SHA']
# If build provenance is not generated, the docker deployment will fail.
requestedVerifyOption: VERIFIED