From 9e601e1b6d6928afa6206003882de626cb26fa97 Mon Sep 17 00:00:00 2001 From: Joe Wang <joewa@google.com> Date: Thu, 19 Dec 2024 18:46:27 -0500 Subject: [PATCH] rename --- ...oudbuild-library-generation-push-prod.yaml | 54 ------------------- .../cloudbuild-library-generation-push.yaml | 34 ++++++++---- 2 files changed, 23 insertions(+), 65 deletions(-) delete mode 100644 .cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml 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 484106a43c..0000000000 --- a/.cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml +++ /dev/null @@ -1,54 +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: - _GAPIC_GENERATOR_JAVA_VERSION: '2.51.1-SNAPSHOT' # {x-version-update:gapic-generator-java:current} - _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", "${_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: - - 'DOCKER_BUILDKIT=1' - -options: - logging: CLOUD_LOGGING_ONLY - -images: - - ${_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/.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}