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 pipeline
rule mode on both the project and group levels (for more context, read thepipeline
schema docs)- look at
scan_result_policy_editor.vue
for examples on using thepolicy_editor_layout.vue
rule
slot and do something similar inscan_execution_policy_editor.vue
by creating a scan executionpolicy_rule_builder.vue
component - look at the files in the
scan_result_policy/lib
directory 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/lib
directory - 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_mode
feature 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