From 1484855624b4522124d5ec1db0a9dbc9176e2ebe Mon Sep 17 00:00:00 2001 From: Enderson Maia Date: Tue, 15 Aug 2023 12:17:31 +0100 Subject: [PATCH] ci: adapat kubeconform to multiple charts --- .github/workflows/kubeconform.yaml | 15 +++++++++------ charts/dapp-crd/ci/test-values.yaml.tpl | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 charts/dapp-crd/ci/test-values.yaml.tpl diff --git a/.github/workflows/kubeconform.yaml b/.github/workflows/kubeconform.yaml index 78826b5..0315be2 100644 --- a/.github/workflows/kubeconform.yaml +++ b/.github/workflows/kubeconform.yaml @@ -11,6 +11,9 @@ jobs: - "1.25.11" - "1.26.6" - "1.27.3" + chart: + - "rollups-validator-node" + - "applications-crd" permissions: contents: read packages: read @@ -21,11 +24,11 @@ jobs: with: fetch-depth: 0 - - name: Configure test-values + - name: Configure test-values for {{ matrix.chart }} env: MNEMONIC: ${{ secrets.MNEMONIC }} ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} - TEST_VALUES_PATH: ./charts/rollups-validator-node/ci/test-values.yaml + TEST_VALUES_PATH: ./charts/{{ matrix.chart }}/ci/test-values.yaml run: cat $TEST_VALUES_PATH.tpl | envsubst > $TEST_VALUES_PATH - name: Set up Helm @@ -33,8 +36,8 @@ jobs: with: version: v3.12.1 - - name: Add dependancies - working-directory: ./charts/rollups-validator-node + - name: Add dependancies for {{ matrix.chart }}} + working-directory: ./charts/{{ matrix.chart }} run: | helm repo add bitnami https://charts.bitnami.com/bitnami helm dependency build @@ -48,9 +51,9 @@ jobs: install kubeconform /usr/local/bin kubeconform -v - - name: Run kubeconform + - name: Run kubeconform for {{ matrix.chart }}} run: | - helm template test -f ./charts/rollups-validator-node/ci/test-values.yaml ./charts/rollups-validator-node | \ + helm template test -f ./charts/{{ matrix.chart }}/ci/test-values.yaml ./charts/{{ matrix.chart }} | \ kubeconform \ -schema-location default \ -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' \ diff --git a/charts/dapp-crd/ci/test-values.yaml.tpl b/charts/dapp-crd/ci/test-values.yaml.tpl new file mode 100644 index 0000000..a2c5e8b --- /dev/null +++ b/charts/dapp-crd/ci/test-values.yaml.tpl @@ -0,0 +1 @@ +{{- /* empty file */}} \ No newline at end of file