From f3c1f56a2f4e269d088aa792164a55b64653f2f2 Mon Sep 17 00:00:00 2001 From: Gavin Halliday Date: Thu, 7 Sep 2023 12:17:58 +0100 Subject: [PATCH] HPCC-XXXX Add workflow test to check if default helm output changes Signed-off-by: Gavin Halliday --- .github/workflows/check-helm-change.yml | 58 +++++++++++++++++++++++++ helm/hpcc/templates/_helpers.tpl | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/check-helm-change.yml diff --git a/.github/workflows/check-helm-change.yml b/.github/workflows/check-helm-change.yml new file mode 100644 index 00000000000..18b7d6c03a4 --- /dev/null +++ b/.github/workflows/check-helm-change.yml @@ -0,0 +1,58 @@ +name: Check for changein helm output + +on: + push: + branches: + - "master" + - "candidate-*" + - "!candidate-7.8.*" + - "!candidate-7.6.*" + - "!candidate-7.4.*" + - "!candidate-7.2.*" + - "!candidate-7.0.*" + - "!candidate-6.*" + pull_request: + branches: + - "master" + - "candidate-*" + - "!candidate-7.8.*" + - "!candidate-7.6.*" + - "!candidate-7.4.*" + - "!candidate-7.2.*" + - "!candidate-7.0.*" + - "!candidate-6.*" + +jobs: + pre_job: + # continue-on-error: true # Uncomment once integration is finished + runs-on: ubuntu-20.04 + # Map a step output to a job output + outputs: + helm: ${{ steps.skip_check.outputs.helm }} + steps: + - id: skip_check + uses: hpcc-systems/github-actions/changed-modules@main + with: + github_token: ${{ github.token }} + build: + name: "Check helm chart lint" + runs-on: ubuntu-20.04 + needs: pre_job + #if: ${{ github.repository == 'hpcc-systems/HPCC-Platform' && needs.pre_job.outputs.helm }} + if: ${{ needs.pre_job.outputs.helm }} + steps: + - uses: actions/checkout@v2 + with: + submodules: false + - uses: azure/setup-helm@v3 + with: + version: 'latest' + token: ${{ secrets.GITHUB_TOKEN }} + id: install + - name: Test + working-directory: ./testing/helm + run: | + helm template helm/hpcc > ${{ runner.temp }}/newoutput.txt + git checkout ${{ github.base_ref }} + helm template helm/hpcc > ${{ runner.temp }}/oldoutput.txt + diff ${{ runner.temp }}/oldoutput.txt ${{ runner.temp }}/newoutput.txt diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index 8b9203a4b2f..f0a5515f7b0 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -190,7 +190,7 @@ Pass in root as . {{- $certificates := (.Values.certificates | default dict) -}} {{- $issuers := ($certificates.issuers | default dict) -}} {{- $security := .Values.security | default dict -}} -deploymentName: {{ (include "hpcc.fullname" (dict "root" $)) }} +deployment: {{ (include "hpcc.fullname" (dict "root" $)) }} mtls: {{ (include "hpcc.isMtlsEnabled" (dict "root" $)) }} imageVersion: {{ .Values.global.image.version | default .Chart.Version }} singleNode: {{ .Values.global.singleNode | default false }}