Skip to content

Commit f62742c

Browse files
ci: fix library generation presubmit (#12803)
Fixes https://github.com/googleapis/google-cloud-java/pull/12801/checks?check_run_id=71341727672 `failed to solve with frontend dockerfile.v0: failed to read dockerfile: error from sender: resolve : lstat .cloudbuild: no such file or directory` --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
1 parent dce372c commit f62742c

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

gapic-libraries-bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.google.cloud</groupId>
55
<artifactId>gapic-libraries-bom</artifactId>
66
<packaging>pom</packaging>
7-
<version>1.85.1</version><!-- {x-version-update:google-cloud-java:current} -->
7+
<version>1.85.0</version><!-- {x-version-update:google-cloud-java:current} -->
88
<name>Google Cloud Java BOM</name>
99
<description>
1010
BOM for the libraries in google-cloud-java repository. Users should not

sdk-platform-java/.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ steps:
2323
# Use a fixed protoc version so that the generation result stays the same
2424
"--build-arg", "PROTOC_VERSION=25.8",
2525
"-t", "${_TEST_IMAGE}",
26-
"-f", ".cloudbuild/library_generation/library_generation_airlock.Dockerfile",
26+
"-f", "sdk-platform-java/.cloudbuild/library_generation/library_generation_airlock.Dockerfile",
2727
"."
2828
]
2929
id: build-image
@@ -82,7 +82,7 @@ steps:
8282
"run",
8383
"--rm",
8484
"-v", "/workspace/google-cloud-java:/workspace",
85-
"-v", "/workspace/hermetic_build/library_generation/tests/resources/integration/google-cloud-java:/workspace/config",
85+
"-v", "/workspace/sdk-platform-java/hermetic_build/library_generation/tests/resources/integration/google-cloud-java:/workspace/config",
8686
"-v", "/workspace/googleapis:/workspace/apis",
8787
# Fix gapic-generator-java so that the generation result stays
8888
# the same.
@@ -110,7 +110,7 @@ steps:
110110
source .venv/bin/activate
111111
pip install --require-hashes -r requirements.txt
112112
python -m unittest integration_tests.py
113-
dir: ".cloudbuild/library_generation/scripts"
113+
dir: "sdk-platform-java/.cloudbuild/library_generation/scripts"
114114
id: verify-generation
115115
waitFor: ["generate-libraries"]
116116
options:

sdk-platform-java/.cloudbuild/library_generation/cloudbuild-library-generation-push-exitgate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ steps:
2525
"build",
2626
"-t", "${_SHA_IMAGE_ID}",
2727
"-t", "${_VERSIONED_IMAGE_ID}",
28-
"-f", ".cloudbuild/library_generation/library_generation_airlock.Dockerfile",
28+
"-f", "sdk-platform-java/.cloudbuild/library_generation/library_generation_airlock.Dockerfile",
2929
"."
3030
]
3131
id: library-generation-build

sdk-platform-java/.cloudbuild/library_generation/library_generation.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN V=$(cat /java-formatter-version) && curl -o "/google-java-format.jar" "https
3333
# Compile and install packages
3434
RUN mvn install -B -ntp -T 1.5C -DskipTests -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip -pl sdk-platform-java/gapic-generator-java --also-make
3535
RUN cp "/root/.m2/repository/com/google/api/gapic-generator-java/${DOCKER_GAPIC_GENERATOR_VERSION}/gapic-generator-java-${DOCKER_GAPIC_GENERATOR_VERSION}.jar" \
36-
"./gapic-generator-java.jar"
36+
"/gapic-generator-java.jar"
3737

3838
FROM docker.io/library/python:3.13.2-slim@sha256:6b3223eb4d93718828223966ad316909c39813dee3ee9395204940500792b740 as final
3939

@@ -94,7 +94,7 @@ ENV JAVA_FORMATTER_LOCATION="${HOME}/.library_generation/google-java-format.jar"
9494
# Note that the destination is a well-known location that will be assumed at runtime
9595
# We hard-code the location string to avoid making it configurable (via ARG) as
9696
# well as to avoid it making it overridable at runtime (via ENV).
97-
COPY --from=ggj-build "/google-cloud-java/gapic-generator-java.jar" "${HOME}/.library_generation/gapic-generator-java.jar"
97+
COPY --from=ggj-build "/gapic-generator-java.jar" "${HOME}/.library_generation/gapic-generator-java.jar"
9898
RUN chmod 755 "${HOME}/.library_generation/gapic-generator-java.jar"
9999
ENV GAPIC_GENERATOR_LOCATION="${HOME}/.library_generation/gapic-generator-java.jar"
100100

sdk-platform-java/.cloudbuild/library_generation/library_generation_airlock.Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,22 @@
1818
# 3.9.9-eclipse-temurin-11-alpine
1919
FROM us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/maven@sha256:d3f04985c6a68415e36c0a6468d0f8316f27d4dbee77bc459257ba444224bd9f AS ggj-build
2020

21-
WORKDIR /sdk-platform-java
22-
COPY sdk-platform-java/ .
21+
WORKDIR /google-cloud-java
22+
23+
COPY . .
2324
# {x-version-update-start:gapic-generator-java:current}
2425
ENV DOCKER_GAPIC_GENERATOR_VERSION="2.71.0"
2526
# {x-version-update-end}
2627

2728
# Download the java formatter
28-
RUN mvn -pl gapic-generator-java-pom-parent help:evaluate -Dexpression='google-java-format.version' -q -DforceStdout > /java-formatter-version
29+
RUN mvn -pl sdk-platform-java/gapic-generator-java-pom-parent help:evaluate -Dexpression='google-java-format.version' -q -DforceStdout > /java-formatter-version
2930
RUN cat /java-formatter-version
3031
RUN V=$(cat /java-formatter-version) && curl -o "/google-java-format.jar" "https://maven-central.storage-download.googleapis.com/maven2/com/google/googlejavaformat/google-java-format/${V}/google-java-format-${V}-all-deps.jar"
3132

3233
# Skipping the fmt check until 3.9.9-eclipse-temurin-17-alpine:969014ee8852 is available in Airlock.
33-
RUN mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
34+
RUN mvn install -B -ntp -T 1.5C -DskipTests -Dcheckstyle.skip -Dclirr.skip -Denforcer.skip -Dfmt.skip -pl sdk-platform-java/gapic-generator-java --also-make
3435
RUN cp "/root/.m2/repository/com/google/api/gapic-generator-java/${DOCKER_GAPIC_GENERATOR_VERSION}/gapic-generator-java-${DOCKER_GAPIC_GENERATOR_VERSION}.jar" \
35-
"./gapic-generator-java.jar"
36+
"/gapic-generator-java.jar"
3637

3738
# 3.12.3-slim-bookworm
3839
FROM us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/python@sha256:afc139a0a640942491ec481ad8dda10f2c5b753f5c969393b12480155fe15a63 as final
@@ -94,7 +95,7 @@ ENV JAVA_FORMATTER_LOCATION="${HOME}/.library_generation/google-java-format.jar"
9495
# Note that the destination is a well-known location that will be assumed at runtime
9596
# We hard-code the location string to avoid making it configurable (via ARG) as
9697
# well as to avoid it making it overridable at runtime (via ENV).
97-
COPY --from=ggj-build "/sdk-platform-java/gapic-generator-java.jar" "${HOME}/.library_generation/gapic-generator-java.jar"
98+
COPY --from=ggj-build "/gapic-generator-java.jar" "${HOME}/.library_generation/gapic-generator-java.jar"
9899
RUN chmod 755 "${HOME}/.library_generation/gapic-generator-java.jar"
99100
ENV GAPIC_GENERATOR_LOCATION="${HOME}/.library_generation/gapic-generator-java.jar"
100101

0 commit comments

Comments
 (0)