Skip to content

Commit

Permalink
chore: publish to two repos (#3479)
Browse files Browse the repository at this point in the history
In this PR:
- Publish library generation image to two image repos.
- Rename cloudbuild.yaml since the original trigger is deleted
(cl/708074481).
  • Loading branch information
JoeWang1127 authored Dec 20, 2024
1 parent ae9eb03 commit b1be200
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 58 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,29 @@

timeout: 7200s # 2 hours
substitutions:
_IMAGE_NAME: "gcr.io/cloud-devrel-public-resources/java-library-generation"
_GAPIC_GENERATOR_JAVA_VERSION: '2.51.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}"
_PRIVATE_IMAGE_NAME: "us-docker.pkg.dev/java-hermetic-build-prod/private-resources/java-library-generation"
_PRIVATE_SHA_IMAGE_ID: "${_PRIVATE_IMAGE_NAME}:${COMMIT_SHA}"
_PRIVATE_LATEST_IMAGE_ID: "${_PRIVATE_IMAGE_NAME}:latest"
_PRIVATE_VERSIONED_IMAGE_ID: "${_PRIVATE_IMAGE_NAME}:${_GAPIC_GENERATOR_JAVA_VERSION}"
_PUBLIC_IMAGE_NAME: "gcr.io/cloud-devrel-public-resources/java-library-generation"
_PUBLIC_SHA_IMAGE_ID: "${_PUBLIC_IMAGE_NAME}:${COMMIT_SHA}"
_PUBLIC_LATEST_IMAGE_ID: "${_PUBLIC_IMAGE_NAME}:latest"
_PUBLIC_VERSIONED_IMAGE_ID: "${_PUBLIC_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", "."]
"-t", "${_PRIVATE_SHA_IMAGE_ID}",
"-t", "${_PRIVATE_LATEST_IMAGE_ID}",
"-t", "${_PRIVATE_VERSIONED_IMAGE_ID}",
"-t", "${_PUBLIC_SHA_IMAGE_ID}",
"-t", "${_PUBLIC_LATEST_IMAGE_ID}",
"-t", "${_PUBLIC_VERSIONED_IMAGE_ID}",
"-f", ".cloudbuild/library_generation/library_generation_airlock.Dockerfile",
"."
]
id: library-generation-build
waitFor: ["-"]
env:
Expand All @@ -37,6 +46,9 @@ options:
logging: CLOUD_LOGGING_ONLY

images:
- ${_SHA_IMAGE_ID}
- ${_LATEST_IMAGE_ID}
- ${_VERSIONED_IMAGE_ID}
- ${_PRIVATE_SHA_IMAGE_ID}
- ${_PRIVATE_LATEST_IMAGE_ID}
- ${_PRIVATE_VERSIONED_IMAGE_ID}
- ${_PUBLIC_SHA_IMAGE_ID}
- ${_PUBLIC_LATEST_IMAGE_ID}
- ${_PUBLIC_VERSIONED_IMAGE_ID}
2 changes: 1 addition & 1 deletion .github/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ bumpMinorPreMajor: true
handleGHRelease: true
primaryBranch: main
manifest: true
extraFiles: ["WORKSPACE", ".cloudbuild/graalvm/cloudbuild.yaml", ".cloudbuild/graalvm/cloudbuild-test-a.yaml", ".cloudbuild/graalvm/cloudbuild-test-b.yaml", ".cloudbuild/library_generation/cloudbuild-library-generation-release.yaml", "generation_config.yaml"]
extraFiles: ["WORKSPACE", ".cloudbuild/graalvm/cloudbuild.yaml", ".cloudbuild/graalvm/cloudbuild-test-a.yaml", ".cloudbuild/graalvm/cloudbuild-test-b.yaml"]
4 changes: 2 additions & 2 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
".cloudbuild/graalvm/cloudbuild-test-a.yaml",
".cloudbuild/graalvm/cloudbuild-test-b.yaml",
".cloudbuild/library_generation/cloudbuild-library-generation-push.yaml",
".cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml",
".cloudbuild/library_generation/library_generation.Dockerfile"
".cloudbuild/library_generation/library_generation.Dockerfile",
".cloudbuild/library_generation/library_generation_airlock.Dockerfile"
]
}
}
Expand Down

0 comments on commit b1be200

Please sign in to comment.