GitHub file kind - Support dry run to avoid errors on the main branch
complete
Matar Peles
Today when using the file kind in the Git provider mapping it is mapping the file only from the main branch and if there is an issue with the file structure / a mismatch with the blueprint schema you will only see that in the audit log as an error. This feature's idea is to allow to run a dry run of the mapping on the feature branch before it is merged, so that I will be able to fix that before and have a perfect version in the main branch. So a perfect flow would be - I write my yaml in my feature branch, I finish and opening a PR, a check / something is verifying the structure of the yaml can be mapped to a Port entity, and it is merged to main.
Matan Grady
Merged in a post:
Validate Port Yaml against branch
M
Matthew Parry
Currently it looks like the Validate Port Yaml GitHub status check only runs against master/main. If I introduce a new file which is referenced within the same port.yml, the check fails as the file has not yet been merged to main. It would be good if the validation was performed against the current branch.
Matan Grady
complete
Matan Grady
This is now released!
To use it, add the flag to the relevant mapping block:
- kind: file
selector:
query: .repo.name == "backstage"
files:
- path: packages/catalog-model/examples/domains/*.yaml
validationCheck: true