|
1 | 1 | --- |
2 | 2 | name: Verify json schema |
3 | 3 |
|
4 | | -# |
5 | | -# Documentation: |
6 | | -# https://help.github.com/en/articles/workflow-syntax-for-github-actions |
7 | | -# |
8 | | - |
9 | | -############################# |
10 | | -# Start the job on all push # |
11 | | -############################# |
12 | 4 | on: [push, pull_request] |
13 | 5 |
|
14 | | -############### |
15 | | -# Set the Job # |
16 | | -############### |
17 | 6 | jobs: |
18 | 7 | jsonschema_tests: |
19 | | - # Name the Job |
20 | 8 | name: Json Schema tests |
21 | 9 | strategy: |
22 | 10 | matrix: |
23 | 11 | python-version: [3.11] |
24 | | - # Set the agent to run on |
25 | 12 | runs-on: ubuntu-latest |
26 | 13 |
|
27 | | - ################## |
28 | | - # Load all steps # |
29 | | - ################## |
30 | 14 | steps: |
31 | | - ########################## |
32 | | - # Checkout the code base # |
33 | | - ########################## |
34 | 15 | - name: Checkout Code |
35 | 16 | uses: actions/checkout@v4 |
36 | | - with: |
37 | | - # Full git history is needed to get a proper list of changed files within `super-linter` |
38 | | - fetch-depth: 0 |
39 | 17 |
|
40 | 18 | - name: Set up Python ${{ matrix.python-version }} |
41 | 19 | uses: actions/setup-python@v5 |
|
54 | 32 |
|
55 | 33 | - name: Verify secrets json schema against templates |
56 | 34 | run: | |
57 | | - # check-jsonschema needs .yaml as an extension |
58 | 35 | cp ./values-secret.yaml.template ./values-secret.yaml |
59 | | - check-jsonschema --schemafile https://raw.githubusercontent.com/validatedpatterns/rhvp.cluster_utils/refs/heads/main/roles/vault_utils/values-secrets.v2.schema.json values-secret.yaml |
| 36 | + check-jsonschema --fill-defaults --schemafile https://raw.githubusercontent.com/validatedpatterns/rhvp.cluster_utils/refs/heads/main/roles/vault_utils/values-secrets.v2.schema.json values-secret.yaml |
60 | 37 | rm -f ./values-secret.yaml |
61 | 38 |
|
62 | 39 | - name: Verify ClusterGroup values.schema.json against values-*yaml files |
|
66 | 43 | # disable shellcheck of single quotes in yq |
67 | 44 | # shellcheck disable=2016 |
68 | 45 | yq eval-all '. as $item ireduce ({}; . * $item )' values-global.yaml "$i" > tmp.yaml |
69 | | - check-jsonschema --schemafile https://raw.githubusercontent.com/validatedpatterns/clustergroup-chart/refs/heads/main/values.schema.json tmp.yaml |
| 46 | + check-jsonschema --fill-defaults --schemafile https://raw.githubusercontent.com/validatedpatterns/clustergroup-chart/refs/heads/main/values.schema.json tmp.yaml |
70 | 47 | rm -f tmp.yaml |
71 | 48 | done |
72 | 49 |
|
0 commit comments