Merge pull request #160 from flatcar-linux/tormath1/fix-sdk-version

jenkins/manifest: use gsutil to download SDK version
This commit is contained in:
Mathieu Tortuyaux 2021-10-06 17:33:30 +02:00 committed by GitHub
commit 3b923e7abc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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