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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for checking receipe format #210

Open
arejula27 opened this issue Jul 28, 2024 · 3 comments
Open

Add option for checking receipe format #210

arejula27 opened this issue Jul 28, 2024 · 3 comments

Comments

@arejula27
Copy link

Sometimes the gh action takes 5 minutes and then fails because of a wrong recipe format. This rating time can be avoided by adding a static checker before running everything, also users can use it locally as a githook so they never commit a wrong receipe

@xynydev
Copy link
Member

xynydev commented Jul 28, 2024

This is planned, we'll have JSONSchema validation, the schema repo is here: https://github.com/blue-build/schema
This will also support validation inside your code editor, if it supports YAML LSP.

@arejula27
Copy link
Author

I was thinking also to add a version field, similar to kubernetes files, where the first line says which version uses the file

@xynydev
Copy link
Member

xynydev commented Jul 28, 2024

Since a standard comment line linking the schema is needed for LSP support, I thought that that could also encode the recipe format version:
# yaml-language-server: $schema=https://schema.blue-build.org/recipe-v1.json
^ that is the line I'm using currently for testing

#180 is where we're planning recipe v2 and we'll probably roll out the schema validation at the same time as that.

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

No branches or pull requests

2 participants