Skip to content

Commit

Permalink
fix generator jar
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeWang1127 committed Dec 19, 2024
1 parent 3272b14 commit d7ae12a
Showing 1 changed file with 19 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,40 +63,20 @@ 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"
# id: generate-libraries
# waitFor: [
# "build-image",
# "download-api-definitions",
# "prepare-golden"
# ]
- name: ubuntu:24.04
entrypoint: bash
args:
- "-c"
- |
apt update && apt install -y maven
mvn dependency:copy \
-B -ntp \
-Dartifact=com.google.api:gapic-generator-java:2.38.1 \
-DoutputDirectory=/workspace
cd /workspace
mv gapic-generator-java-2.38.1.jar gapic-generator-java.jar
id: prepare-generator-jar
waitFor: [ "-" ]

- name: gcr.io/cloud-builders/docker
args: [
Expand All @@ -105,6 +85,9 @@ steps:
"-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",
# Fix gapic-generator-java so that the generation result stays
# the same.
"-v", "/workspace/gapic-generator-java.jar:/home/.library_generation/gapic-generator-java.jar",
"${_TEST_IMAGE}",
"--generation-config-path=/workspace/config/generation_config.yaml",
"--api-definitions-path=/workspace/apis"
Expand All @@ -115,7 +98,8 @@ steps:
waitFor: [
"build-image",
"download-api-definitions",
"prepare-golden"
"prepare-golden",
"prepare-generator-jar"
]

- name: ubuntu:24.04
Expand Down

0 comments on commit d7ae12a

Please sign in to comment.