Skip to content

Commit 90e9926

Browse files
authored
Merge pull request #1331 from consideRatio/pr/add-json-schema
Add schema.yaml for helm3 compliant chart validation
2 parents 0c6109b + a4c368a commit 90e9926

File tree

12 files changed

+817
-6
lines changed

12 files changed

+817
-6
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,5 @@ jobs:
8080
env:
8181
GITHUB_REPOSITORY: "${{ github.repository }}"
8282
run: |
83+
./tools/generate-json-schema.py
8384
./ci/publish

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ jobs:
102102
(cd helm-chart && chartpress)
103103
git --no-pager diff --color=always
104104
105+
- name: Generate values.schema.json from schema.yaml
106+
if: matrix.test == 'helm'
107+
run: |
108+
tools/generate-json-schema.py
109+
110+
- name: "Helm template --validate (with lint-and-validate-values.yaml)"
111+
if: matrix.test == 'helm'
112+
run: |
113+
helm template --validate binderhub-test helm-chart/binderhub \
114+
--values tools/templates/lint-and-validate-values.yaml
115+
105116
- name: Validate the chart against the k8s API
106117
if: matrix.test == 'helm'
107118
run: |

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chartpress==1.0.*
33
click
44
codecov
55
html5lib
6+
jsonschema
67
jupyterhub
78
pytest
89
pytest-asyncio

helm-chart/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
binderhub/values.schema.json
2+
13
### macOS ###
24
*.DS_Store
35
.AppleDouble

helm-chart/binderhub/.helmignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Anything within the root folder of the Helm chart, where Chart.yaml resides,
2+
# will be embedded into the packaged Helm chart. This is reasonable since only
3+
# when the templates render after the chart has been packaged and distributed,
4+
# will the templates logic evaluate that determines if other files were
5+
# referenced, such as our our files/hub/jupyterhub_config.py.
6+
#
7+
# Here are files that we intentionally ignore to avoid them being packaged,
8+
# because we don't want to reference them from our templates anyhow.
9+
schema.yaml
10+
111
# Patterns to ignore when building packages.
212
# This supports shell glob matching, relative path matching, and
313
# negation (prefixed with !). Only one pattern per line.

0 commit comments

Comments
 (0)