From 8f8abfaca48b296bfe955a6aad003a4e23cd4d36 Mon Sep 17 00:00:00 2001 From: waliMSFT <105239794+waliMSFT@users.noreply.github.com> Date: Wed, 23 Aug 2023 13:48:10 -0400 Subject: [PATCH] hotfix baseimage scirpt (#2108) --- build/buildRunTimeImageBases.sh | 3 +++ images/build/installDotNetCore.sh | 9 ++++++++- images/installPlatform.sh | 11 +++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/build/buildRunTimeImageBases.sh b/build/buildRunTimeImageBases.sh index 86af0e20c..690fe6ccc 100755 --- a/build/buildRunTimeImageBases.sh +++ b/build/buildRunTimeImageBases.sh @@ -42,6 +42,9 @@ then fi fi +# checking and retrieving token for the `oryxsdksstaging` account. +retrieveSastokenFromKeyvault $PRIVATE_STAGING_SDK_STORAGE_BASE_URL + echo echo "Building the common base image wih bullseye and buster flavor '$RUNTIME_BASE_IMAGE_NAME'..." echo diff --git a/images/build/installDotNetCore.sh b/images/build/installDotNetCore.sh index e32799545..594622aed 100644 --- a/images/build/installDotNetCore.sh +++ b/images/build/installDotNetCore.sh @@ -16,10 +16,17 @@ if [ -z "$sdkStorageAccountUrl" ]; then fi if [ "$sdkStorageAccountUrl" == "$PRIVATE_STAGING_SDK_STORAGE_BASE_URL" ]; then set +x + isSasTokenEmpty=1 sasToken=$ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN - set -x if [ -z "$sasToken" ]; then + isSasTokenEmpty=0 + fi + set -x + + if [ $isSasTokenEmpty -eq 0 ]; then echo "sasToken cannot be empty for $sdkStorageAccountUrl." + else + echo "sasToken is valid for $sdkStorageAccountUrl." fi fi echo diff --git a/images/installPlatform.sh b/images/installPlatform.sh index 84f79f6da..50c43c9e6 100644 --- a/images/installPlatform.sh +++ b/images/installPlatform.sh @@ -50,11 +50,18 @@ if [ -z "$sdkStorageAccountUrl" ]; then sdkStorageAccountUrl=$PRIVATE_STAGING_SDK_STORAGE_BASE_URL fi if [ "$sdkStorageAccountUrl" == "$PRIVATE_STAGING_SDK_STORAGE_BASE_URL" ]; then - set +x + set +x + isSasTokenEmpty=1 sasToken=$ORYX_SDK_STORAGE_ACCOUNT_ACCESS_TOKEN - set -x if [ -z "$sasToken" ]; then + isSasTokenEmpty=0 + fi + set -x + + if [ $isSasTokenEmpty -eq 0 ]; then echo "sasToken cannot be empty for $sdkStorageAccountUrl." + else + echo "sasToken is valid for $sdkStorageAccountUrl." fi fi if [ -z "$debianFlavor" ] || [ "$debianFlavor" == "stretch" ]; then