FE: Create schedule branch rule component
Why are we doing this work
- Users want to create rules that are based off of a schedule
Relevant links
Non-functional requirements
- Feature flag:
- Testing:
Implementation plan
- frontend create schedule rule mode on both the project and group levels (for more context look at the
scheduleschema 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 FE: Create pipeline rule component (#359885 - closed))Schedule(handled by this issue)
- for this issue, only focus on
2, but feel free to make it a drop down
- there are two options for rules:
- branch dropdown
- there are two options for the dropdown in the above image that has
branchselectedbranch(handled by this issue)agent(handled by FE: Create schedule agent rule component (#367278 - closed))
- for this issue, only focus on
1, but feel free to make it a drop down
- there are two options for the dropdown in the above image that has
- branches dropdown
- per &5363 (comment 894764465), give the user an input box instead for the user to type comma-delimited branches
- CRON dropdowns
- per &5363 (comment 894814030), limit users to only specific schedules, allowing a user to use
yamlmode to do anything more complicated
- per &5363 (comment 894814030), limit users to only specific schedules, allowing a user to use
- 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 schedule rule works
- Navigate to a group =>
Security & Compliance=>Policies=>New policy=>Scan Execution Policy - Verify rule mode schedule rule works
Edited by Alexander Turinske
