Add validation for file path in custom yaml mode
Why are we doing this work
Using gitlab file api
Add validation for a file path, when file path is provided, it is required to check if file exist in repository before adding it to a policy
The following discussion from !137151 (merged) should be addressed:
-
@mcavoj started a discussion: (+2 comments) question(non-blocking): would it be possible / is it planned in the future to extend this validation and check if the file really exists and that it's accessible for us to use in the CI config?
Relevant links
- File api
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing:
Implementation plan
- Add file async file path validation in
code_block_action.vue - Use file api for this
- Add tests
Verification steps
- Go to
Project/Group->Secure->Policies-> New execution policy. - Add new action
Execute a YAML code block - Select
Linked existing CI fileoption - Input file path both for existing and non-existing file