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

Using yaml-language-server as a CICD Pipeline yml schema validation tool #984

Open
madslyng opened this issue Aug 8, 2024 · 1 comment

Comments

@madslyng
Copy link

madslyng commented Aug 8, 2024

Summary

How do I run custom yml schema validation in a CICD pipeline?

Relevant information

We are building CICD Pipeline for Databricks Asset Bundle (DAB), using a bundle_config_schema.json which describes what is allowed to be specified in our config.yml files. If someone puts something incorrect, we would like the CICD Pipeline to be able to explain what the yaml-language-server found that diverges from the schema it is validating against.

I am having trouble getting the yaml-language-server --stdio to work. Maybe someone is able to help me understand how I would prepare and execute a shell command in this scenario:

Two files:

  1. file_to_validate.yml
  2. schema_to_use_for_validation.json

cat file_to_validate.yml | yaml-language-server --stdio > result

What am I missing to introduce the schema in the above command ?

@bollwyvl
Copy link
Contributor

You may wish to try ylsc

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