diff --git a/.cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml b/.cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml deleted file mode 100644 index 95dd479c53..0000000000 --- a/.cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -timeout: 7200s # 2 hours -substitutions: - _IMAGE_NAME: "us-docker.pkg.dev/java-hermetic-build-prod/private-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}" -steps: - # Library generation build - - name: gcr.io/cloud-builders/docker - args: [ - "build", - "-t", "${_SHA_IMAGE_ID}", - "-t", "${_LATEST_IMAGE_ID}", - "-t", "${_VERSIONED_IMAGE_ID}", - "-f", ".cloudbuild/library_generation/library_generation_airlock.Dockerfile", - "." - ] - id: library-generation-build - waitFor: ["-"] - env: - - 'DOCKER_BUILDKIT=1' - -options: - logging: CLOUD_LOGGING_ONLY - -images: - - ${_SHA_IMAGE_ID} - - ${_LATEST_IMAGE_ID} - - ${_VERSIONED_IMAGE_ID} diff --git a/.cloudbuild/library_generation/cloudbuild-library-generation-push.yaml b/.cloudbuild/library_generation/cloudbuild-library-generation-push.yaml index 11f84f9042..484106a43c 100644 --- a/.cloudbuild/library_generation/cloudbuild-library-generation-push.yaml +++ b/.cloudbuild/library_generation/cloudbuild-library-generation-push.yaml @@ -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: @@ -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} diff --git a/.github/release-please.yml b/.github/release-please.yml index a2e978d935..c117556ed1 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -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"] diff --git a/release-please-config.json b/release-please-config.json index c264303ad1..713fe12052 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -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" ] } }