From 3c1d6b3a633219d11cea3a18a314a1ea63e21a9d Mon Sep 17 00:00:00 2001 From: Demonsthere Date: Tue, 5 Apr 2022 11:12:27 +0200 Subject: [PATCH] fix: upgrade pipeline source tag --- .circleci/helm-upgrade.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.circleci/helm-upgrade.sh b/.circleci/helm-upgrade.sh index 2da597298f..a4cb61e81b 100755 --- a/.circleci/helm-upgrade.sh +++ b/.circleci/helm-upgrade.sh @@ -5,7 +5,8 @@ cfg=$(mktemp) export cfg export KUBECONFIG="$cfg" export TIMEOUT="120s" -export BASE_RELEASE=$(curl -s https://api.github.com/repos/ory/k8s/releases/latest | grep "tag_name" | cut -d ':' -f 2 | tr -d '", ') + +export BASE_RELEASE=$(helm search repo "ory/$1" | awk '{print $2}' | head -2 | tail -1) kind get kubeconfig > "$cfg" @@ -19,10 +20,10 @@ function teardown() { trap teardown HUP INT QUIT TERM EXIT -echo "---> Installing $1 from ${BASE_RELEASE}" +echo "---> Installing $1 from v${BASE_RELEASE}" set +e -helm install -f "https://raw.githubusercontent.com/ory/k8s/${BASE_RELEASE}/.circleci/values/$1.yaml" "${release}" "ory/$1" --wait --timeout="${TIMEOUT}" +helm install -f "https://raw.githubusercontent.com/ory/k8s/v${BASE_RELEASE}/.circleci/values/$1.yaml" "${release}" "ory/$1" --wait --timeout="${TIMEOUT}" export INSTALLATION_STATUS=$? set -e