Skip to content

Commit

Permalink
Add cloudbuild tag config (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
gibbleyg authored Apr 6, 2021
1 parent 0034207 commit c0da738
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions cloudbuild-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
substitutions:
_STAGING_PROJECT_ID: null

steps:
- id: Pull Staging Image
name: gcr.io/cloud-builders/docker
args: ["pull", "gcr.io/$_STAGING_PROJECT_ID/mpdev:sha_$COMMIT_SHA"]
- id: Tag Image
name: gcr.io/cloud-builders/docker
args: ["tag", "gcr.io/$_STAGING_PROJECT_ID/mpdev:sha_$COMMIT_SHA",
"gcr.io/$PROJECT_ID/mpdev:$TAG_NAME"]

images:
- gcr.io/$PROJECT_ID/mpdev:$TAG_NAME
6 changes: 3 additions & 3 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ timeout: 1200s
steps:
- id: Docker build
name: gcr.io/cloud-builders/docker
args: ['build', '.', '-t', 'gcr.io/$PROJECT_ID/mpdev', '--cache-from',
args: ['build', '.', '-t', 'gcr.io/$PROJECT_ID/mpdev:sha_$COMMIT_SHA', '--cache-from',
'gcr.io/$PROJECT_ID/mpdev:latest']
- id: Test mpdev apply
name: gcr.io/$PROJECT_ID/mpdev
name: gcr.io/$PROJECT_ID/mpdev:sha_$COMMIT_SHA
args: ['apply', '-f', 'examples/deployment-manager/autogen/singlevm/configurations.yaml']
env: ['MPDEV_TMP_DIR=/workspace']

images:
- 'gcr.io/$PROJECT_ID/mpdev'
- 'gcr.io/$PROJECT_ID/mpdev:sha_$COMMIT_SHA'

0 comments on commit c0da738

Please sign in to comment.