-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
13 lines (13 loc) · 797 Bytes
/
cloudbuild.yaml
File metadata and controls
13 lines (13 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
steps:
# build docker image from source code
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'eu.gcr.io/$PROJECT_ID/appengineapi:$COMMIT_SHA', '-t', 'eu.gcr.io/$PROJECT_ID/appengineapi:latest', '.' ]
# copy contents of image to cloud build /workspace file by mounting the /workspace volume
- name: 'gcr.io/cloud-builders/docker'
args: [ 'run', '--volume', '/workspace:/workspace', 'eu.gcr.io/$PROJECT_ID/appengineapi:latest' ]
# run our custom deployment script from /workspace
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args: [ '-c', '/workspace/scripts/deploy --canary --project $PROJECT_ID' ]
# publish images to container registry
images: [ 'eu.gcr.io/$PROJECT_ID/appengineapi:$COMMIT_SHA', 'eu.gcr.io/$PROJECT_ID/appengineapi:latest' ]