Skip to content

Commit

Permalink
ci: adapat kubeconform to multiple charts
Browse files Browse the repository at this point in the history
  • Loading branch information
endersonmaia committed Aug 16, 2023
1 parent ae20242 commit c8505f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/kubeconform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,20 +24,20 @@ 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
uses: azure/setup-helm@v3
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
Expand All @@ -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' \
Expand Down
1 change: 1 addition & 0 deletions charts/dapp-crd/ci/test-values.yaml.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- /* empty file */}}

0 comments on commit c8505f6

Please sign in to comment.