Dry-Run Validation of GitHub Pipeline Changes in Github
pending feedback
D
Definite Lobster
Changes made directly in Github do not go through any validation. Harness only validates pipeline changes done through Harness UI.
If we are to make a change to 300+ pipelines via Github, there is no way to run this validation right now.
Request is to expose Harness validation API or build a feature where users can easily validate their feature branches.
Log In
D
Definite Lobster
Hi Sudarshan Purohit - It looks like Harness already has an account level Webhook which seems to do "some" dry-run validation. At least schema checks.
Please see support request #88477. Instead of users like us writing the whole functionality to do schema checks against https://github.com/harness/harness-schema/tree/main/v0, isn't it better to just expose this API for us to use?
Writing our own validation logic against the (ever-changing) schema comes at a cost of maintaining it.
Sudarshan Purohit
pending feedback
Sudarshan Purohit
Hi Definite Lobster, we do have the public schema for Pipelines and Templates available at https://github.com/harness/harness-schema/tree/main/v0, which can be used to validate Pipeline YAML in code editors.
Some additional validation that happens during Pipeline runs, is dependent on the permissions of the user that ran the pipeline (for example, do they have access to the production deployment environment), so that kind of validation wouldn't be done during a dry run. The validation results may also hinge on the runtime inputs provided.
For a static validation of YAML, we would recommend using the public schemas with a text editor tool. An API from Harness would pretty much do the same thing (but require connectivity details and access privileges for the Git repo, hence being limited).
Shylaja Sundararajan
under review
D
Definite Lobster