jenkins/manifest: use gsutil to download SDK version

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Mathieu Tortuyaux 2021-10-06 13:40:33 +02:00
parent ccdc52cc15
commit d9bf2e89c5
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8

View File

@ -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."