From d9bf2e89c584a1825f5d3aaebf1d6cd8bd2d7d7e Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 6 Oct 2021 13:40:33 +0200 Subject: [PATCH] jenkins/manifest: use gsutil to download SDK version Signed-off-by: Mathieu Tortuyaux --- jenkins/manifest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jenkins/manifest.sh b/jenkins/manifest.sh index e373e5250c..5841905d84 100755 --- a/jenkins/manifest.sh +++ b/jenkins/manifest.sh @@ -55,7 +55,8 @@ source manifest/version.txt if [[ "${SDK_VERSION}" == sdk-*-nightly ]] then - SDK_VERSION=$(curl -s -S -f -L "https://storage.googleapis.com/flatcar-jenkins/developer/sdk/amd64/${SDK_VERSION}.txt" | tee /dev/stderr) + # Get the SDK version from GCS - we use gsutil to get access to the bucket since it's private. + SDK_VERSION=$(docker run --rm -v "${GOOGLE_APPLICATION_CREDENTIALS}:/opt/release.json:ro" google/cloud-sdk:alpine bash -c "gcloud auth activate-service-account --key-file /opt/release.json && gsutil cat gs://flatcar-jenkins/developer/sdk/amd64/${SDK_VERSION}.txt" | tee /dev/stderr) if [[ -z "${SDK_VERSION}" ]] then echo "No SDK found, retrigger the manifest job with default SDK_VERSION and SDK_URL_PATH values."