FE: Create pipeline rule component
Why are we doing this work
- Users want to use a Rule mode to create a scan execution policy because yaml can be hard to parse
Relevant links
Non-functional requirements
-
Feature flag: -
Testing:
Implementation plan
-
frontend create pipelinerule mode on both the project and group levels (for more context, read thepipelineschema docs)- look at
scan_result_policy_editor.vuefor examples on using thepolicy_editor_layout.vueruleslot and do something similar inscan_execution_policy_editor.vueby creating a scan executionpolicy_rule_builder.vuecomponent - look at the files in the
scan_result_policy/libdirectory on how to convert to/from yaml (e.g.to_yaml.js,from_yaml.js,humanize.js, andrules.js) and follow that pattern in thescan_execution_policy/libdirectory - rule dropdown
- there are two options for rules:
-
A pipeline is run(handled by this issue) -
Schedule(handled by FE: Create schedule branch rule component (#359886 - closed))
-
- for this issue, only focus on
1, but feel free to make it a drop down
- there are two options for rules:
- branches dropdown
- per &5363 (comment 894764465), give the user an input box instead for the user to type comma-delimited branches
- look at
-
frontend ensure the policy_drawer continues to display the humanized policy correctly
Verification steps
- Upload a GitLab Ultimate license
- Turn on the
:scan_execution_rule_modefeature flag - Navigate to a project =>
Security & Compliance=>Policies=>New policy=>Scan Execution Policy - Verify rule mode branches rule works
- Navigate to a group =>
Security & Compliance=>Policies=>New policy=>Scan Execution Policy - Verify rule mode branches rule works
Edited by Alexander Turinske
