Refactor scan execution policy logic using pipeline context
What does this MR do and why?
We want to align scan execution policies with pipeline execution policies when it comes to the bypass of the policy jobs with skip ci directive. Currently, pipeline execution policies are always forced and skip ci is ignored. However, scan execution policies are skipped.
In Allow users to configure skip ci behavior for p... (!173480 - merged), we're adding a configuration option to set the behavior in the policy and to allow certain users to be excepted from the enforcement.
In order to add this functionality to scan execution policies, we need to refactor the logic first. The whole feature is split up into 3 MRs:
- Part 1: Refactor pipeline policy context to be more gen... (!174969 - merged)
- Part 2: Refactor scan execution policy logic using pipe... (!174974 - merged) <- this one
- Part 3: Allow users to configure skip_ci behavior for s... (!174975 - merged)
Refactor scan execution policy logic using pipeline context
- Move logic from
ProcessorintoScanExecutionPolicies::PipelineContext - Add object to represent scan execution policy config
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.
- Full MR for overview: Draft: Allow users to configure skip_ci behavi... (!174191 - closed)
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.
Related to #482952 (closed)