Support Pipeline execution policies in policy commit
requested to merge 465867-backend-support-pipeline-execution-policies-in-graphql-create-mutation into master
What does this MR do and why?
This MR adds support for Pipeline execution policies when committing changes to the policy.
It also extends the schema and adds pipeline_config_strategy
as a required property (which we can freely do because the feature is behind a feature flag).
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
- In rails console enable the feature flag
Feature.enable(:pipeline_execution_policy_type)
- Visit a group.
- Go to Settings -> General
- Under Permissions and group features, enable Security policy pipeline execution action
- Create a project in this group
- Go to Secure -> Policies and create a new Pipeline execution policy
- Go to
.yaml mode
and use the following yaml. Change project to another existing project and file to any file within that project.type: pipeline_execution_policy name: Test description: '' enabled: true pipeline_config_strategy: inject_ci content: include: project: gitlab-org/pipeline-execution-policies/compliance-project file: compliance.yml
- Configure via merge request and merge
- Go back to the project's policies, the policy should show up
- Edit the policy, it should load policy in the editor (with rule mode disabled until !155481 (merged) is merged)
Related to #465867 (closed)
Edited by Martin Čavoj