Skip to content

Commit

Permalink
Enforce value files must match schema
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Nov 23, 2024
1 parent c82af70 commit 71cec5f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 24 deletions.
41 changes: 18 additions & 23 deletions .github/workflows/helm-charts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,28 @@ jobs:
- name: Lint charts
id: lint
run: ct lint --all
# collect-values-files-to-validate:
# runs-on: ubuntu-latest
# name: Validate values schema json
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Validate values schema json
# uses: losisin/helm-values-schema-json-action@v1
# with:
# input: values.yaml
# fail-on-diff: true
# validate-values-schema:
# runs-on: ubuntu-latest
# name: Validate values schema json
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Validate values schema json
# uses: losisin/helm-values-schema-json-action@v1
# with:
# input: values.yaml
# fail-on-diff: true
validate-values-schema:
runs-on: ubuntu-latest
name: Validate values schema json
strategy:
matrix:
include:
- chart: cron-jobs
values: ci/sleep-values.yaml
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate values schema json
uses: losisin/helm-values-schema-json-action@v1
with:
input: charts/${{ matrix.chart }}/${{ matrix.values }}
output: charts/${{ matrix.chart }}/values.schema.json
fail-on-diff: true
test:
runs-on: ubuntu-latest
needs:
- lint
# - validate-values-schema
- validate-values-schema
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion charts/cron-jobs/ci/sleep-values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# List of cronjobs to create
jobs:
# Cronjob's name
- name: sleep # @schema required:true
- naam: sleep # @schema required:true
# Cronjob's schedule following [https://crontab.guru/](crontab syntax)
schedule: "* * * * *" # @schema required:true
# Any labels to apply to the created cronjob
Expand Down

0 comments on commit 71cec5f

Please sign in to comment.