Fix error creating pipeline with external policy CI
What does this MR do and why?
This fixes an error when creating a pipeline with a pipeline execution policy and an external CI file.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Create a new Group.
- Navigate to Settings -> General.
- Expand the Permissions and group features section.
- Enable the "Run customized CI YAML file as security policy actions" experiment.
- Create a new project in the group.
- Add a new file called 'ci.yml' to the project with content:
Security Policy CI Job: stage: test script: - echo "This defined in a scan execution policy"
- Create another project in the group with a simple ci file:
Job From Project CI: stage: test script: - echo "Ci job"
- Select Secure -> Policies -> New policy .
- Select Scan execution policy.
- Choose a name.
- Select Add new action.
- Select Run CI/CD code.
- Select Run linked existing CI file.
- Select the
ci.yml
file from the first project you created. - Select Configure with a merge request and merge the MR.
- Go back to the previous project and start a new pipeline.
- This should work successfully without showing "Undefined error"..
Related to #437642 (closed)
Edited by Andy Schoenen