From 349274eae0e1c948e6018caaa941a062e7168564 Mon Sep 17 00:00:00 2001 From: Christian Kadner Date: Tue, 9 Jan 2024 15:40:17 -0800 Subject: [PATCH] enclose commit short hash in quotes Signed-off-by: Christian Kadner --- .github/workflows/fvt-base.yml | 6 ++---- scripts/deploy/iks/deploy-mm-serving.sh | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/fvt-base.yml b/.github/workflows/fvt-base.yml index 154c6ff1..8c20711a 100644 --- a/.github/workflows/fvt-base.yml +++ b/.github/workflows/fvt-base.yml @@ -57,9 +57,7 @@ jobs: - name: Set controller image tag run: | - # TODO: remove this next line and reinstate the original line after that - echo "IMAGE_TAG=7284872" >> $GITHUB_ENV - # echo "IMAGE_TAG=$(date +'%Y%m%dT%H%M%S%Z')" >> $GITHUB_ENV + echo "IMAGE_TAG=$(date +'%Y%m%dT%H%M%S%Z')" >> $GITHUB_ENV - name: Update configs # Update the image tag and reduce some resource request amounts to allow FVTs to run @@ -67,7 +65,7 @@ jobs: # is also adjusted for these environments. # Disable the torchserve ServingRuntime for now (insufficient resources to run them all). run: | - sed -i 's/newTag:.*$/newTag: '"${{ env.IMAGE_TAG }}"'/' config/manager/kustomization.yaml + sed -i 's/newTag:.*$/newTag: "'${{ env.IMAGE_TAG }}'"/' config/manager/kustomization.yaml sed -i '0,/cpu:.*$/s/cpu:.*$/cpu: 100m/' \ config/default/config-defaults.yaml \ config/runtimes/mlserver-1.x.yaml \ diff --git a/scripts/deploy/iks/deploy-mm-serving.sh b/scripts/deploy/iks/deploy-mm-serving.sh index 7f7627b9..da46dc8f 100644 --- a/scripts/deploy/iks/deploy-mm-serving.sh +++ b/scripts/deploy/iks/deploy-mm-serving.sh @@ -76,7 +76,8 @@ curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack mv kustomize /usr/local/bin/kustomize # Update target tag and namespace/organization -sed -i.bak 's/newTag:.*$/newTag: '"$GIT_COMMIT_SHORT"'/' config/manager/kustomization.yaml +# enclose commit short hash in quotes to avoid it being interpreted as an int +sed -i.bak 's/newTag:.*$/newTag: "'${GIT_COMMIT_SHORT}'"/' config/manager/kustomization.yaml sed -i.bak 's/newName:.*$/newName: '"$DOCKERSANDBOX_NAMESPACE\/modelmesh-controller"'/' config/manager/kustomization.yaml rm config/manager/kustomization.yaml.bak