Link compliance frameworks with pipeline execution policies
What does this MR do and why?
This MR adds ability to list pipeline execution policies on Framework Page by providing new API to return these policies in GraphQL API. This work is handled first by ensuring that propper link is created in the database and then adding ability to list them using API.
Background migration will be solved in separate MR.
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.
Video
How to set up and validate locally
- Create new root group
- For that group create new Compliance Framework (Secure -> Compliance center -> Frameworks)
- Create new project in that group, add
pep.yml
file with some GitLab CI jobs configuration - Go to Secure -> Policies -> Create new policy -> Select Pipeline Execution Policy type
- In the Policy scope, select Compliance Framework you've created in 2. step,
- Configure the policy using the file provided in 3. step
- Create and merge the MR
- Go to GraphQL Explorer (
-/graphql-explorer
) - Run the query:
query { group(fullPath: "root-group") { complianceFrameworks { nodes { id name scanExecutionPolicies { nodes { name } } pipelineExecutionPolicies { nodes { name } } } } } }
- You should see in the results created Pipeline Execution Policy.
Numbered steps to set up and validate the change are strongly suggested.
Related to #492552 (closed)
Edited by Alan (Maciej) Paruszewski