Skip to content

Commit

Permalink
Merge pull request #655 from r2d4/publish-images
Browse files Browse the repository at this point in the history
cloudbuild: publish skaffold images on commit and tag
  • Loading branch information
dgageot authored Jun 8, 2018
2 parents 602db9b + abcc868 commit 61d9270
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions deploy/cloudbuild-release.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
steps:
# Build the container that will do the go build.
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'builder', '-f', 'deploy/skaffold/Dockerfile', '.']
args: ['build', '-t', 'gcr.io/k8s-skaffold/skaffold:$TAG_NAME', '-f', 'deploy/skaffold/Dockerfile', '.']
# Do the go build.
- name: 'builder'
- name: 'gcr.io/k8s-skaffold/skaffold:$TAG_NAME'
args: ['make', 'cross']
# Upload to GCS.
- name: 'gcr.io/cloud-builders/gsutil'
Expand All @@ -12,3 +12,4 @@ steps:
# Upload to GCS.
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', '-r', 'gs://skaffold/releases/$TAG_NAME/*', 'gs://skaffold/releases/latest/']
images: ['gcr.io/k8s-skaffold/skaffold:$TAG_NAME']
5 changes: 3 additions & 2 deletions deploy/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
steps:
# Build the container that will do the go build.
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'builder', '-f', 'deploy/skaffold/Dockerfile', '.']
args: ['build', '-t', 'gcr.io/k8s-skaffold/skaffold:$COMMIT_SHA', '-f', 'deploy/skaffold/Dockerfile', '.']
# Do the go build.
- name: 'builder'
- name: 'gcr.io/k8s-skaffold/skaffold:$COMMIT_SHA'
args: ['make', 'cross']
# Upload to GCS.
- name: 'gcr.io/cloud-builders/gsutil'
Expand All @@ -12,3 +12,4 @@ steps:
# Upload to GCS.
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', '-r', 'gs://skaffold/builds/$COMMIT_SHA/*', 'gs://skaffold/builds/latest/']
images: ['gcr.io/k8s-skaffold/skaffold:$COMMIT_SHA']

0 comments on commit 61d9270

Please sign in to comment.