Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Buildkite pipeline schema #198

Closed
mwgamble opened this issue Dec 13, 2022 · 4 comments 路 Fixed by #217
Closed

Include Buildkite pipeline schema #198

mwgamble opened this issue Dec 13, 2022 · 4 comments 路 Fixed by #217
Labels
enhancement New feature or request

Comments

@mwgamble
Copy link

As a user of Buildkite, I would super appreciate it if their pipeline schema was bundled with check-jsonschema 馃檹

https://github.com/buildkite/pipeline-schema/

@sirosen sirosen added the enhancement New feature or request label Dec 15, 2022
@sirosen
Copy link
Member

sirosen commented Dec 15, 2022

Right now, the only schemas included are listed in schemastore. I'm not strictly against adding something else, but it makes things easier for me if I can point at them as my "source of truth".

I therefore come to you with a request back, so that I can fulfill this, that you get Buildkite added to schemastore.

Schemastore is pretty easygoing about new schemas. They'll generally ask that you do the work of adding one, but it's not very hard. Since this one is hosted on GitHub, you'll basically just need to add a link and description to their catalog. Here's an example block which defines a github-hosted schema for angular:
https://github.com/SchemaStore/schemastore/blob/be5a3214685981a4574819ec0a59f8dbc66980fc/src/api/json/catalog.json#L77-L82

To explain a little bit why it helps:

  • schemastore provides me with a canonical link to the schema
  • their catalog lists matching filename patterns, which I use as a basis for check-jsonschema's pre-commit hooks
  • it will be very useful when I finish my project to pull the vendored schemastore schemas into a separate library

If you don't feel comfortable or able to add the schema to schemastore, I'll try to get to it, but I'm pretty swamped with work right now, so no promises on timeline.

@mwgamble
Copy link
Author

It is in schemastore:

https://github.com/SchemaStore/schemastore/blob/be5a3214685981a4574819ec0a59f8dbc66980fc/src/api/json/catalog.json#L524-L542

For reasons I don't understand, it's just not hosted on the schemastore website.

@sirosen
Copy link
Member

sirosen commented Dec 19, 2022

馃う Sorry about that! I had searched, but missed it! Maybe I looked for buildkite (all lowercase).

I'll work on pulling this in when I'm next able.

sirosen added a commit that referenced this issue Jan 3, 2023
1. Add Buildkite to the catalog
2. Add a test-case from the Buildkite repo
3. Fix minor issues in the vendor-schemas script
   - bugfix KeyError when adding new schemas
   - strip trailing whitespace so that pre-commit run doesn't munge
     hash comparison
4. Update generate-hooks-config script to handle 'types_or'
5. Run vendor-schemas and generate-hooks-config

Resolves #198
sirosen added a commit that referenced this issue Jan 3, 2023
1. Add Buildkite to the catalog
2. Add a test-case from the Buildkite repo
3. Fix minor issues in the vendor-schemas script
   - bugfix KeyError when adding new schemas
   - strip trailing whitespace so that pre-commit run doesn't munge
     hash comparison
4. Update generate-hooks-config script to handle 'types_or'
5. Run vendor-schemas and generate-hooks-config

Resolves #198
sirosen added a commit that referenced this issue Jan 3, 2023
1. Add Buildkite to the catalog
2. Add a test-case from the Buildkite repo
3. Fix minor issues in the vendor-schemas script
   - bugfix KeyError when adding new schemas
   - strip trailing whitespace so that pre-commit run doesn't munge
     hash comparison
4. Update generate-hooks-config script to handle 'types_or'
5. Run vendor-schemas and generate-hooks-config

Resolves #198
sirosen added a commit that referenced this issue Jan 3, 2023
1. Add Buildkite to the catalog
2. Add a test-case from the Buildkite repo
3. Fix minor issues in the vendor-schemas script
   - bugfix KeyError when adding new schemas
   - strip trailing whitespace so that pre-commit run doesn't munge
     hash comparison
4. Update generate-hooks-config script to handle 'types_or'
5. Run vendor-schemas and generate-hooks-config

Resolves #198
@sirosen
Copy link
Member

sirosen commented Jan 4, 2023

I've just released v0.20.0 which includes this. 馃コ

Please let me know if you run into any issues using it, and thanks for putting in the request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants