From abd07eb282418b7e11518c04902116b5a2e607b4 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Thu, 19 Dec 2024 08:01:43 -0500 Subject: [PATCH] use docker image --- ...d-library-generation-integration-test.yaml | 76 ++++++++++++------- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git a/.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml b/.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml index 8994950a45..b1c4d3e610 100644 --- a/.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml +++ b/.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml @@ -63,34 +63,54 @@ steps: id: prepare-golden waitFor: ["-"] -- name: ubuntu:24.04 - entrypoint: bash - args: - - "-c" - - | - # Install docker - apt update - apt install -y ca-certificates curl gnupg lsb-release - mkdir -p /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \ - gpg --dearmor -o /etc/apt/keyrings/docker.gpg - echo \ - "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) stable" | \ - tee /etc/apt/sources.list.d/docker.list > /dev/null - apt update - apt -y install \ - docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - docker run \ - --rm \ - --quiet \ - -u "$(id -u):$(id -g)" \ - -v "/workspace/google-cloud-java:/workspace" \ - -v "/workspace/hermetic_build/library_generation/tests/resources/integration/google-cloud-java:/workspace/config" \ - -v "/workspace/googleapis:/workspace/apis" \ - "${_TEST_IMAGE}" \ - --generation-config-path="/workspace/config/generation_config.yaml" \ - --api-definitions-path="/workspace/apis" +#- name: ubuntu:24.04 +# entrypoint: bash +# args: +# - "-c" +# - | +# # Install docker +# apt update +# apt install -y ca-certificates curl gnupg lsb-release +# mkdir -p /etc/apt/keyrings +# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \ +# gpg --dearmor -o /etc/apt/keyrings/docker.gpg +# echo \ +# "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ +# $(lsb_release -cs) stable" | \ +# tee /etc/apt/sources.list.d/docker.list > /dev/null +# apt update +# apt -y install \ +# docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin +# docker run \ +# --rm \ +# --quiet \ +# -u "$(id -u):$(id -g)" \ +# -v "/workspace/google-cloud-java:/workspace" \ +# -v "/workspace/hermetic_build/library_generation/tests/resources/integration/google-cloud-java:/workspace/config" \ +# -v "/workspace/googleapis:/workspace/apis" \ +# "${_TEST_IMAGE}" \ +# --generation-config-path="/workspace/config/generation_config.yaml" \ +# --api-definitions-path="/workspace/apis" +# id: generate-libraries +# waitFor: [ +# "build-image", +# "download-api-definitions", +# "prepare-golden" +# ] + +- name: gcr.io/cloud-builders/docker + args: [ + "run", + "--rm", + "-v", "/workspace/google-cloud-java:/workspace", + "-v", "/workspace/hermetic_build/library_generation/tests/resources/integration/google-cloud-java:/workspace/config", + "-v", "/workspace/googleapis:/workspace/apis", + "${_TEST_IMAGE}", + "--generation-config-path=/workspace/config/generation_config.yaml", + "--api-definitions-path=/workspace/apis" + ] + env: + - "DOCKER_BUILDKIT=1" id: generate-libraries waitFor: [ "build-image",