ods-jenkins-shared-library
ods-jenkins-shared-library copied to clipboard
Validation layer for orchestration pipeline's YAML
Is your feature request related to a problem? Please describe. I've seen many mistakes by users when editing the Release Manager's metadata.yml file and unfortunately the orchestration pipeline is not able to return a meaningful message indicating what the problem is.
Examples of the most common mistakes I've seen so far:
-
Bad YAML indentation after editing the metadata.yml file.
-
They forget to remove the array after specifying the repositories
repositories: [] <---- *** This***
- id: A
url: https://github.com/my-org/my-repo-A.git
branch: master
type: ods
- Template version should wrapped in double quotes:
capabilities:
- LeVADocs:
GAMPCategory: 5
templatesVersion: "1.1" <---- *** This ***
Describe the solution you'd like I would like a validation layer that evaluates the metadata.yml's content and check if it is valid or not, syntax-wise and returns a meaningful message indicating the line number and why it failed. This will help a lot of users that are not familiar with YAML and will show a more mature product face to these end-users.
Describe alternatives you've considered
Additional context
considering the criticity of RM I think we should code a validator
Not needed @segator. An explicit conversion to String when the parameter is read in the MRO is good enough.
I like the idea of a validator - eg. the template still comes with a "[ ]" which I usually forget to remove
Hi,
Today I got a different user that made the mistake of including a whitespace just right before the 'c' character in the word capabilities:
# Uncomment (below) to generate documents
capabilities: <--- *** notice there's an extra whitespace at the beginning of the line ***
- LeVADocs:
GAMPCategory: 5