RoadieHQ / backstage-entity-validator

Validate properties and well known annotations in your Backstage catalog-info.yaml files.
https://roadie.io
65 stars 14 forks source link

Handle nunjucks syntax for template files #54

Open sblausten opened 1 year ago

sblausten commented 1 year ago

Describe Request:

Running this against the cli generated example template that contains a contents folder with templated catalog-info file where the name parameter uses nunjucks to dynamically create the name, fails as the validator expects a string matching a limited regex for the name parameter.

Examples:

Adding https://github.com/backstage/software-templates/tree/main/scaffolder-templates/pull-request fails validation due to:

Error: "metadata.name" is not valid; expected a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total but found "${{ values.name | dump }}". To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md

Supporting Documentation Links:

roadie-bot commented 1 year ago

https://app.shortcut.com/larder/story/13272