Allow policy pipeline with only `.pre` and `.post` stages
What does this MR do and why?
Allow policy pipeline with only .pre
and .post
stages.
Regular pipelines are not allowed to be created if they only contain jobs in .pre
and .post
stages.
However, for execution policy pipelines, we want to allow them to be created. Users may want to utilize .pre
stage if they don't have the need for blocking other DAG jobs by waiting for .pipeline-policy-pre
stage to finish.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
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.
How to set up and validate locally
- Create a project
- Create a pipeline execution policy
- Assign a policy job to the
.pre
stage - Run a pipeline
- Verify that the policy job is injected into the pipeline