From cb0cfa43c96b5d5247401b0be26771dd51b82e08 Mon Sep 17 00:00:00 2001 From: Debdut Chakraborty Date: Thu, 31 Aug 2023 11:49:18 +0530 Subject: [PATCH] use separate chart version --- k8s/microservices.bats | 3 ++- k8s/monolith.bats | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/k8s/microservices.bats b/k8s/microservices.bats index 3c196c0..d967bff 100644 --- a/k8s/microservices.bats +++ b/k8s/microservices.bats @@ -16,6 +16,7 @@ setup_file() { export ROCKETCHAT_TAG export ROCKETCHAT_CHART_DIR export ROCKETCHAT_CHART_ARCHIVE="${ROCKETCHAT_CHART_DIR%/}/rocketchat-${ROCKETCHAT_TAG}.tgz" + export HELM_TAG="${HELM_TAG:-$ROCKETCHAT_TAG}" } # bats test_tags=pre @@ -49,7 +50,7 @@ setup_file() { if [[ -f "$ROCKETCHAT_CHART_ARCHIVE" ]]; then skip "chart package already exists" fi - run_and_assert_success helm package --app-version "$ROCKETCHAT_TAG" --version "$ROCKETCHAT_TAG" "$ROCKETCHAT_CHART_DIR" -d "$(dirname "$ROCKETCHAT_CHART_ARCHIVE")" + run_and_assert_success helm package --app-version "$ROCKETCHAT_TAG" --version "$HELM_TAG" "$ROCKETCHAT_CHART_DIR" -d "$(dirname "$ROCKETCHAT_CHART_ARCHIVE")" assert [ -f "$ROCKETCHAT_CHART_ARCHIVE" ] } diff --git a/k8s/monolith.bats b/k8s/monolith.bats index 2b82303..b781f99 100644 --- a/k8s/monolith.bats +++ b/k8s/monolith.bats @@ -16,6 +16,7 @@ setup_file() { export ROCKETCHAT_TAG export ROCKETCHAT_CHART_DIR export ROCKETCHAT_CHART_ARCHIVE="${ROCKETCHAT_CHART_DIR%/}/rocketchat-${ROCKETCHAT_TAG}.tgz" + export HELM_TAG="${HELM_TAG:-$ROCKETCHAT_TAG}" } # bats test_tags=pre @@ -48,7 +49,7 @@ setup_file() { if [[ -f "$ROCKETCHAT_CHART_ARCHIVE" ]]; then skip "chart package already exists" fi - run_and_assert_success helm package --app-version "$ROCKETCHAT_TAG" --version "$ROCKETCHAT_TAG" "$ROCKETCHAT_CHART_DIR" -d "$(dirname "$ROCKETCHAT_CHART_ARCHIVE")" + run_and_assert_success helm package --app-version "$ROCKETCHAT_TAG" --version "$HELM_TAG" "$ROCKETCHAT_CHART_DIR" -d "$(dirname "$ROCKETCHAT_CHART_ARCHIVE")" assert [ -f "$ROCKETCHAT_CHART_ARCHIVE" ] }