Skip to content

Commit

Permalink
feat: push SNAPSHOT versions of the hermetic build docker image (#2888)
Browse files Browse the repository at this point in the history
This PR simplifies the setup of image publication. It will now rely on a
single Cloud Build workflow that will push an image with three tags
whenever there is a push to the `main` branch (i.e. merged PR):
 - An image tagged with the commit SHA of the merged commit
 - An image tagged `latest`
- An image tagged with the generator version (e.g. 1.1.1-SNAPSHOT or
1.1.1 when it's a release PR)

** Follow ups **
 - [ ] disable the release trigger in Cloud Build
  • Loading branch information
diegomarquezp authored Jun 13, 2024
1 parent d567453 commit 81df866
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,23 @@
timeout: 7200s # 2 hours
substitutions:
_IMAGE_NAME: "gcr.io/cloud-devrel-public-resources/java-library-generation"
_GAPIC_GENERATOR_JAVA_VERSION: '2.41.1-SNAPSHOT' # {x-version-update:gapic-generator-java:current}
_SHA_IMAGE_ID: "${_IMAGE_NAME}:${COMMIT_SHA}"
_LATEST_IMAGE_ID: "${_IMAGE_NAME}:latest"
_VERSIONED_IMAGE_ID: "${_IMAGE_NAME}:${_GAPIC_GENERATOR_JAVA_VERSION}"
steps:
# Library generation build
- name: gcr.io/cloud-builders/docker
args: [
"build",
"-t", "${_SHA_IMAGE_ID}",
"-t", "${_LATEST_IMAGE_ID}",
"-t", "${_VERSIONED_IMAGE_ID}",
"--file", ".cloudbuild/library_generation/library_generation.Dockerfile", "."]
id: library-generation-build
waitFor: ["-"]

images:
- ${_SHA_IMAGE_ID}
- ${_LATEST_IMAGE_ID}
- ${_VERSIONED_IMAGE_ID}

This file was deleted.

0 comments on commit 81df866

Please sign in to comment.