Add summary for schedule pipeline policy
What does this MR do and why?
Add summary for schedule pipeline policy
- generate summary if a schedule exists
- create sentence structure for summary
- pipeline_execution_schedule_policy policies cannot be retrieved from the backend yet, so this code relies on mocking the response
- create tests
EE: true
References
Screenshots or screen recordings
| Example summaries |
|---|
|
|
|
How to set up and validate locally
- Upload a GitLab Ultimate license
- Navigate to a project/group => Secure => Policies => New policy => Pipeline execution policy => Create a new policy
- Add the following patch
diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/pipeline_execution/details_drawer.vue b/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/pipeline_execution/details_drawer.vue
index c3efd4648c37..223364ce1f39 100644
--- a/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/pipeline_execution/details_drawer.vue
+++ b/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/pipeline_execution/details_drawer.vue
@@ -51,8 +51,30 @@ export default {
return this.policy?.policyScope;
},
parsedYaml() {
+ // TODO remove
+ const mockPipelineExecutionSchedulePolicy = `name: ''
+description: ''
+enabled: true
+content:
+ include:
+ - project: gitlab-org/gitlab-test
+ file: .gitlab-ci.yml
+skip_ci:
+ allowed: false
+schedules:
+ - branch_type: protected
+ type: weekly
+ start_time: '00:00'
+ time_window:
+ value: 86400
+ distribution: random
+ timezone: Pacific/Midway
+ days:
+ - monday
+ - thursday`;
return fromYaml({
- manifest: this.policy.yaml,
+ manifest: mockPipelineExecutionSchedulePolicy,
+ // manifest: this.policy.yaml,
type: POLICY_TYPE_COMPONENT_OPTIONS.pipelineExecution.urlParameter,
});
},
- Navigate to a project/group => Secure => Policies => Select the pipeline execution policy
- Verify the summary drawer
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #505174 (closed)
Edited by Alexander Turinske


