From b6e9326ef0e769c9e2038285f9fbc3c959baf028 Mon Sep 17 00:00:00 2001 From: Tim Downey Date: Wed, 21 Apr 2021 12:21:09 -0700 Subject: [PATCH] FIX: Update QuarksSecret build script and tests - the build script used to modify the version of the Helm chart from x.x.x to 0.0.0; some of this was removed in 8fe5ab4b403dd239f48f33612270c026c2c3ee09 but not the part about checking out the Chart's changes at the end - this caused the Chart updates to get missed in that commit - also includes a test fix to account for the rename of the quarks-secret deployment [#177703767](https://www.pivotaltracker.com/story/show/177703767) Authored-by: Tim Downey --- .../_vendir/deploy/helm/quarks-secret/Chart.yaml | 4 ++-- build/quarks-secret/build.sh | 9 --------- tests/ytt/quarks_secret_test.go | 4 ++-- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/build/quarks-secret/_vendir/deploy/helm/quarks-secret/Chart.yaml b/build/quarks-secret/_vendir/deploy/helm/quarks-secret/Chart.yaml index 533875215..0a2ef3e29 100644 --- a/build/quarks-secret/_vendir/deploy/helm/quarks-secret/Chart.yaml +++ b/build/quarks-secret/_vendir/deploy/helm/quarks-secret/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: quarks-secret -version: x.x.x -appVersion: x.x.x +version: 0.0.0 +appVersion: 0.0.0 description: A Helm chart for quarks-secret, a k8s operator to create secrets home: https://github.com/cloudfoundry-incubator/quarks-secret icon: https://cloudfoundry-incubator.github.io/quarks-helm/logo.png diff --git a/build/quarks-secret/build.sh b/build/quarks-secret/build.sh index e19e0a0c6..43b715fae 100755 --- a/build/quarks-secret/build.sh +++ b/build/quarks-secret/build.sh @@ -5,16 +5,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" echo "generating QuarksSecret resource definitions..." -chart_yaml=${SCRIPT_DIR}/_vendir/deploy/helm/quarks-secret/Chart.yaml - -# some versions of sed create this strange file with a -r suffix -if [[ -f ${SCRIPT_DIR}/_vendir/deploy/helm/quarks-secret/Chart.yaml-r ]]; then - rm ${SCRIPT_DIR}/_vendir/deploy/helm/quarks-secret/Chart.yaml-r -fi - helm template cf-quarks-secret --namespace=cf-system "${SCRIPT_DIR}/_vendir/deploy/helm/quarks-secret" \ --values="${SCRIPT_DIR}/quarks-values.yaml" | ytt --ignore-unknown-comments -f - | kbld -f "${SCRIPT_DIR}/image-override.yml" -f - > "${SCRIPT_DIR}/../../config/quarks-secret/_ytt_lib/quarks-secret/rendered.yml" - -git checkout ${chart_yaml} diff --git a/tests/ytt/quarks_secret_test.go b/tests/ytt/quarks_secret_test.go index 683f8ab7b..50726f58d 100644 --- a/tests/ytt/quarks_secret_test.go +++ b/tests/ytt/quarks_secret_test.go @@ -54,7 +54,7 @@ var _ = Describe("QuarksSecret", func() { It("should not have a deployment for quarks secret", func() { Expect(ctx).To(ProduceYAML( - Not(WithDeployment("cf-quarks-secret", "cf-system")), + Not(WithDeployment("quarks-secret", "cf-system")), )) }) }) @@ -67,7 +67,7 @@ var _ = Describe("QuarksSecret", func() { It("should have a deployment for quarks secret", func() { Expect(ctx).To(ProduceYAML( - WithDeployment("cf-quarks-secret", "cf-system"), + WithDeployment("quarks-secret", "cf-system"), )) }) // MAYBE TODO: Add check for the actual CRD?