11---
22name : Verify json schema
33
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- # ############################
124on : [push, pull_request]
135
14- # ##############
15- # Set the Job #
16- # ##############
176jobs :
187 jsonschema_tests :
19- # Name the Job
208 name : Json Schema tests
219 strategy :
2210 matrix :
2311 python-version : [3.11]
24- # Set the agent to run on
2512 runs-on : ubuntu-latest
2613
27- # #################
28- # Load all steps #
29- # #################
3014 steps :
31- # #########################
32- # Checkout the code base #
33- # #########################
3415 - name : Checkout Code
3516 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
3917
4018 - name : Set up Python ${{ matrix.python-version }}
4119 uses : actions/setup-python@v5
@@ -54,19 +32,19 @@ jobs:
5432
5533 - name : Verify secrets json schema against templates
5634 run : |
57- # check-jsonschema needs .yaml as an extension
5835 cp ./values-secret.yaml.template ./values-secret.yaml
59- check-jsonschema --schemafile ./common/ansible /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
6037 rm -f ./values-secret.yaml
6138
6239 - name : Verify ClusterGroup values.schema.json against values-*yaml files
6340 run : |
64- set -e; for i in values-hub.yaml values-group-one.yaml; do
41+ set -e
42+ find . -maxdepth 1 -type f -name "values-*.yaml" ! -name "values-global.yaml" -print0 | while IFS= read -r -d '' i;
43+ do
6544 echo "$i"
6645 # disable shellcheck of single quotes in yq
6746 # shellcheck disable=2016
6847 yq eval-all '. as $item ireduce ({}; . * $item )' values-global.yaml "$i" > tmp.yaml
69- check-jsonschema --schemafile ./common /clustergroup/values.schema.json tmp.yaml
48+ check-jsonschema --fill-defaults -- schemafile https://raw.githubusercontent.com/validatedpatterns /clustergroup-chart/refs/heads/main /values.schema.json tmp.yaml
7049 rm -f tmp.yaml
71- done
72-
50+ done
0 commit comments