From 594c587c75d9d015296ce35ac182eadac6414a31 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Mon, 25 Nov 2024 11:54:14 -0500 Subject: [PATCH] chore(hermetic-build): update final base image and owlbot dependency (#3385) Updates the _final_ base image to the latest as well as the owlbot CLI dependency. --------- Co-authored-by: Joe Wang --- .../library_generation/library_generation.Dockerfile | 7 +++---- .github/workflows/hermetic_library_generation.yaml | 2 +- .github/workflows/verify_library_generation.yaml | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.cloudbuild/library_generation/library_generation.Dockerfile b/.cloudbuild/library_generation/library_generation.Dockerfile index f22bfef7c7..397d460896 100644 --- a/.cloudbuild/library_generation/library_generation.Dockerfile +++ b/.cloudbuild/library_generation/library_generation.Dockerfile @@ -50,11 +50,9 @@ RUN chmod a+x compile-x86_64-alpine-linux.sh RUN sh compile-x86_64-alpine-linux.sh # python:3.12.7-alpine3.20 -FROM docker.io/library/python@sha256:38e179a0f0436c97ecc76bcd378d7293ab3ee79e4b8c440fdc7113670cb6e204 as final +FROM docker.io/library/python@sha256:5049c050bdc68575a10bcb1885baa0689b6c15152d8a56a7e399fb49f783bf98 as final - - -ARG OWLBOT_CLI_COMMITTISH=38fe6f89a2339ee75c77739b31b371f601b01bb3 +ARG OWLBOT_CLI_COMMITTISH=ab222d9a20bb27586433caedc70f049b7853db7e ARG PROTOC_VERSION=25.5 ARG GRPC_VERSION=1.68.1 ARG JAVA_FORMAT_VERSION=1.7 @@ -126,6 +124,7 @@ RUN git checkout "${OWLBOT_CLI_COMMITTISH}" RUN npm i && npm run compile && npm link RUN owl-bot copy-code --version RUN chmod o+rx $(which owl-bot) +RUN apk del -r npm && apk cache clean # download the Java formatter ADD https://maven-central.storage-download.googleapis.com/maven2/com/google/googlejavaformat/google-java-format/${JAVA_FORMAT_VERSION}/google-java-format-${JAVA_FORMAT_VERSION}-all-deps.jar \ diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml index ea29373da3..4eac9faded 100644 --- a/.github/workflows/hermetic_library_generation.yaml +++ b/.github/workflows/hermetic_library_generation.yaml @@ -51,7 +51,7 @@ jobs: run: | GENERATOR_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -pl gapic-generator-java) echo "GENERATOR_VERSION=${GENERATOR_VERSION}" >> "$GITHUB_ENV" - docker build \ + DOCKER_BUILDKIT=1 docker build \ -f .cloudbuild/library_generation/library_generation.Dockerfile \ -t gcr.io/cloud-devrel-public-resources/java-library-generation:"${GENERATOR_VERSION}" \ . diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index c1bb381984..fc6759f50e 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -27,7 +27,7 @@ jobs: git checkout -b "${head_ref}" fork/${head_ref} changed_directories="$(git diff --name-only "fork/${head_ref}" "origin/${base_ref}")" fi - if [[ ${changed_directories} =~ "hermetic_build/" ]]; then + if [[ ${changed_directories} =~ "hermetic_build/" ]] || [[ ${changed_directories} =~ ".cloudbuild/library_generation/" ]]; then echo "should_run=true" >> $GITHUB_OUTPUT else echo "should_run=false" >> $GITHUB_OUTPUT