-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add JSON schema validation for pipeline.yaml and jenkins-x.yml #3757
fix: add JSON schema validation for pipeline.yaml and jenkins-x.yml #3757
Conversation
f32c207
to
08505ae
Compare
I still need to add tests for |
08505ae
to
5c4bfa1
Compare
Oh, I also updated |
...and ignore those first couple errors - I rebased before they could even kick off and they barfed as a result. =) |
912ae79
to
2dd2ddd
Compare
/lgtm |
@abayer just noticed you'd put this PR on hold, I've lgtm so if you're happy for it to merge just cancel the hold. |
@rawlingsj - thanks, but I still want to add more tests and get a consensus on whether we want to use my fork of https://github.com/alecthomas/jsonschema. Oh, and whether we should be doing some kind of release note due to existing jenkins-x.yml files with invalid content failing once this goes live... |
/assign @jstrachan fyi, this now has |
eea9d49
to
d65de26
Compare
aaaaand opened alecthomas/jsonschema#32 to get the changes we need upstream. |
/test integration |
Gonna take this off hold once either my PR upstream gets merged or we know it won't. =) |
d65de26
to
b6baf77
Compare
Ok, new PR to |
b6baf77
to
550e71b
Compare
Also added `jx step buildpack validate`, which validates against `jenkins-x-kubernetes` and `jenkins-x-classic` from the local clones. Note that this depends on https://github.com/abayer/jsonschema, which I'll try to get in a PR to the original (https://github.com/alecthomas/jsonschema). Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Specifically: - `jx step syntax schema [--pipeline|--buildpack]` - `jx step syntax validate pipeline` - `jx step syntax validate buildpacks` Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
/hold cancel The PR we needed is merged, so this is good to go! |
550e71b
to
210e663
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rawlingsj The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…enkins-x#3757) * fix: add JSON schema validation for pipeline.yaml and jenkins-x.yml Also added `jx step buildpack validate`, which validates against `jenkins-x-kubernetes` and `jenkins-x-classic` from the local clones. Note that this depends on https://github.com/abayer/jsonschema, which I'll try to get in a PR to the original (https://github.com/alecthomas/jsonschema). Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com> * chore: New jx step syntax [command] Specifically: - `jx step syntax schema [--pipeline|--buildpack]` - `jx step syntax validate pipeline` - `jx step syntax validate buildpacks` Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com> * chore: switch to alecthomas/jsonschema now that the needed PR is merged Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…enkins-x#3757) * fix: add JSON schema validation for pipeline.yaml and jenkins-x.yml Also added `jx step buildpack validate`, which validates against `jenkins-x-kubernetes` and `jenkins-x-classic` from the local clones. Note that this depends on https://github.com/abayer/jsonschema, which I'll try to get in a PR to the original (https://github.com/alecthomas/jsonschema). Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com> * chore: New jx step syntax [command] Specifically: - `jx step syntax schema [--pipeline|--buildpack]` - `jx step syntax validate pipeline` - `jx step syntax validate buildpacks` Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com> * chore: switch to alecthomas/jsonschema now that the needed PR is merged Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Submitter checklist
Description
Also added
jx step syntax
:jx step syntax schema
- generates JSON schema for either pipeline.yaml or jenkins-x.ymljx step syntax validate buildpacks
- which validates againstjenkins-x-kubernetes
andjenkins-x-classic
from the local clones.jx step syntax validate pipeline
- validates jenkins-x.yml (or another context if specified)Note that this depends on https://github.com/abayer/jsonschema, which
I'll try to get in a PR to the original (https://github.com/alecthomas/jsonschema).
Special notes for the reviewer(s)
/assign @dwnusbaum
/assign @rawlingsj
/assign @pmuir
/assign @ccojocar
/assign @warrenbailey
/assign @hferentschik
/hold
Which issue this PR fixes
fixes #3728