From 8bdd4935223fa601a9df9a1fbd22e3a727f4ef00 Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Fri, 5 Jan 2024 13:30:53 -0800 Subject: [PATCH] ci/cache project root cloudbuild.yaml fix (#3566) When setting up a trigger for this cloudbuild.yaml file, it can only run from the repository root - which then means this script fails as files aren't where they are expected. This fix retains the original structure of the cloudbuild.yaml and shifts the original source files into where the rest of the script expects it. --- build/build-image/cache/cloudbuild.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build/build-image/cache/cloudbuild.yaml b/build/build-image/cache/cloudbuild.yaml index 769095d894..ae500c24ef 100644 --- a/build/build-image/cache/cloudbuild.yaml +++ b/build/build-image/cache/cloudbuild.yaml @@ -15,6 +15,18 @@ steps: + # + # Move everything to the /workspace as this is what the canonical + # build script uses, and we want to be as close to that as possible. + # + - name: bash + id: setup-cache-files + script: | + mkdir /tmp/workspace && \ + mv /workspace/* /tmp/workspace && \ + mv /tmp/workspace/build/build-image/cache/* . && \ + ls -l + - name: 'gcr.io/cloud-builders/docker' id: build_base_image args: