blob: 06cfc19160d0e1c1a1c284e8ad880799bb1b54be [file] [log] [blame]
# Provide instructions for google Cloud Build to auto-build flutter
# auto-submit bot 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 docker image
- name: 'us-docker.pkg.dev/cloud-builders/ga/v1/docker'
args: ['build', '-t', 'us-docker.pkg.dev/$PROJECT_ID/appengine/auto-submit.version-$SHORT_SHA', 'auto_submit']
# Trigger the cloud build that deploys the docker image
- name: gcr.io/cloud-builders/gcloud
entrypoint: '/bin/bash'
args:
- '-c'
- |-
gcloud builds submit \
--config auto_submit/cloudbuild_auto_submit_deploy.yaml \
--substitutions="_GAE_PROMOTE=$_GAE_PROMOTE,SHORT_SHA=$SHORT_SHA" \
--async
timeout: 1200s
images: ['us-docker.pkg.dev/$PROJECT_ID/appengine/auto-submit.version-$SHORT_SHA']
# If build provenance is not generated, the docker deployment will fail.
options:
requestedVerifyOption: VERIFIED