Allow users to configure skip ci behavior for pipeline execution policy
What does this MR do and why?
This MR adds ability to disable [skip ci]
restriction for Pipeline Execution Policies. Users now will have option to allow skipping pipelines created from Pipeline Execution Policies with [skip ci]
and to specify users that should be exempted from that restriction.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
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.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Create new group and new project in that group
- Create new Pipeline Execution Policy (Secure -> Policies -> Create new -> Pipeline Execution Policy) and merge MR with the policy
- Go to project created in 1., modify the file and commit change with
[skip ci]
annotation. -> Pipeline will run - Now go back to Secure -> Policies and modify the policy created in 2.
- Add
skip_ci: { allowed: false, allowlist: { users: [{ id: YOUR_USER_ID }] }}
- Go to project created in 1., modify the file and commit change with
[skip ci]
annotation. -> Pipeline will be skipped - Now go back to Secure -> Policies and modify the policy created in 2.
- Add
skip_ci: { allowed: true }
- Go to project created in 1., modify the file and commit change with
[skip ci]
annotation. -> -> Pipeline will be skipped
---
pipeline_execution_policy:
- name: PEP with skip ci enabled
description: ''
enabled: true
pipeline_config_strategy: inject_ci
content:
include:
- project: root/pep-skip-ci
file: pep.yml
skip_ci:
allowed: false
allowlist:
users:
- id: 1
approval_policy: []
Related to [BE] Add ability to skip_ci to pipeline executi... (#507831 - closed)
Merge request reports
Activity
assigned to @alan
added pipelinetier-1 label
- A deleted user
added backend featureaddition typefeature labels
4 Warnings 786f418b: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. 2c1dfca5: The commit subject must contain at least 3 words. For more information, take a look at our Commit message guidelines. cf6bef16: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
Reviewer roulette
Category Reviewer Maintainer backend @panoskanell
(UTC+2, 2 hours ahead of author)
@10io
(UTC+1, 1 hour ahead of author)
~"Verify" Reviewer review is optional for ~"Verify" @drew
(UTC+0, same timezone as author)
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangermentioned in epic gitlab-org#15647
changed milestone to %17.7
- Resolved by Alan (Maciej) Paruszewski
- Resolved by Andy Schoenen
- Resolved by Andy Schoenen
- Resolved by Alan (Maciej) Paruszewski
- Resolved by Allison Browne
Thanks @alan, looks good! I just added a few minor comments
requested review from @Andyschoenen
mentioned in merge request !174191 (closed)
added 1205 commits
Toggle commit listrequested review from @Andyschoenen
added pipeline:mr-approved label
added pipelinetier-2 label and removed pipelinetier-1 label
Before you set this MR to auto-merge
This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.
Before you set this MR to auto-merge, please check the following:
- You are the last maintainer of this merge request
- The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
- This pipeline is recent enough (created in the last 8 hours)
If all the criteria above apply, please set auto-merge for this merge request.
See pipeline tiers and merging a merge request for more details.
Generated bygitlab_quality-test_tooling
.
Slow tests detected in this merge request. These slow tests might be related to this merge request's changes.Click to expand
Job File Name Duration Expected duration #8519003018 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 92.2 s < 27.12 s #8530896399 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 93.69 s < 27.12 s #8531490150 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 80.56 s < 27.12 s #8535221148 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 80.34 s < 27.12 s #8537041979 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 79.52 s < 27.12 s #8547317370 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 88.85 s < 27.12 s #8586125345 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 94.18 s < 27.12 s #8588199749 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 92.53 s < 27.12 s #8589422823 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 86.57 s < 27.12 s #8591621732 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 93.03 s < 27.12 s #8597204386 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 72.1 s < 27.12 s #8603914600 spec/lib/release_highlights/validator_spec.rb#L82
ReleaseHighlights::Validator when validating all files they should have no errors 86.53 s < 27.12 s - A deleted user
added rspec:slow test detected label
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for f2d5fa9aexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Create | 102 | 0 | 3 | 0 | 105 | ✅ | | Verify | 45 | 0 | 4 | 0 | 49 | ✅ | | Plan | 10 | 0 | 0 | 0 | 10 | ✅ | | Data Stores | 19 | 0 | 0 | 0 | 19 | ✅ | | Package | 25 | 0 | 0 | 0 | 25 | ✅ | | Govern | 55 | 0 | 1 | 0 | 56 | ✅ | | Manage | 1 | 0 | 0 | 0 | 1 | ✅ | | Release | 3 | 0 | 0 | 0 | 3 | ✅ | | Secure | 4 | 0 | 0 | 0 | 4 | ✅ | | Monitor | 3 | 0 | 1 | 0 | 4 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 267 | 0 | 9 | 0 | 276 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-test-on-cng:
test report for f2d5fa9aexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Plan | 79 | 0 | 7 | 0 | 86 | ✅ | | Create | 121 | 0 | 16 | 1 | 137 | ✅ | | Govern | 79 | 0 | 10 | 1 | 89 | ✅ | | Data Stores | 23 | 0 | 8 | 0 | 31 | ✅ | | Verify | 44 | 1 | 16 | 0 | 61 | ❌ | | Configure | 0 | 0 | 3 | 0 | 3 | ➖ | | Fulfillment | 2 | 0 | 6 | 1 | 8 | ✅ | | Release | 4 | 0 | 1 | 0 | 5 | ✅ | | Monitor | 8 | 0 | 11 | 0 | 19 | ✅ | | Manage | 1 | 0 | 7 | 0 | 8 | ✅ | | Package | 21 | 0 | 13 | 0 | 34 | ✅ | | Growth | 0 | 0 | 2 | 0 | 2 | ➖ | | Secure | 2 | 0 | 3 | 0 | 5 | ✅ | | ModelOps | 0 | 0 | 1 | 0 | 1 | ➖ | | Analytics | 2 | 0 | 0 | 1 | 2 | ✅ | | Ai-powered | 0 | 0 | 2 | 0 | 2 | ➖ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 386 | 1 | 106 | 4 | 493 | ❌ | +-------------+--------+--------+---------+-------+-------+--------+
- Resolved by Alan (Maciej) Paruszewski
- Resolved by Alan (Maciej) Paruszewski
- Resolved by Alan (Maciej) Paruszewski
- Resolved by Alan (Maciej) Paruszewski
- Resolved by Alan (Maciej) Paruszewski
mentioned in issue #507354
reset approvals from @Andyschoenen by pushing to the branch
added 338 commits
-
fd348470...5194d757 - 329 commits from branch
master
- 40758dc4 - Allow users to configure skip ci behavior for pipeline execution policy
- ddc0b90f - Make JSON pretty
- 6625f34a - Fix failing specs
- 86e2a954 - Fix failing specs
- c59c841e - Fix failing specs
- b0f175b1 - Modify schema for skip_ci
- a203cf21 - Update policies.rb
- 46c09511 - Address MR comments and fix failing specs
- 5a981b98 - Add missing specs
Toggle commit list-
fd348470...5194d757 - 329 commits from branch
requested review from @allison.browne and removed review request for @grzesiek
- Resolved by Alan (Maciej) Paruszewski
- Resolved by Alan (Maciej) Paruszewski
assigned to @mcavoj
reset approvals from @mc_rocha by pushing to the branch
- Resolved by Allison Browne
mentioned in merge request !174974 (merged)
mentioned in merge request !174975 (merged)
mentioned in merge request !174969 (merged)
mentioned in issue #482952 (closed)
mentioned in issue #508357 (closed)
added 1314 commits
-
c866bd78...f5905496 - 1302 commits from branch
master
- f5905496...822e7af4 - 2 earlier commits
- 3e5667d1 - Fix failing specs
- 9308bf91 - Fix failing specs
- 28e12ae1 - Fix failing specs
- cf6bef16 - Modify schema for skip_ci
- 2c1dfca5 - Update policies.rb
- fad82663 - Address MR comments and fix failing specs
- 48109fb0 - Add missing specs
- ac203990 - Apply 1 suggestion(s) to 1 file(s)
- f12917c4 - Apply 2 suggestion(s) to 1 file(s)
- 786f418b - Rename exceptions to allowlist
Toggle commit list-
c866bd78...f5905496 - 1302 commits from branch
reset approvals from @mc_rocha by pushing to the branch
added 1 commit
- 14b051ca - Add skip_ci to policy content attributes for read model
added 1 commit
- d9e32d19 - Add skip_ci to policy content attributes for read model
- Resolved by Allison Browne
- Resolved by Allison Browne
- Resolved by Allison Browne
- Resolved by Allison Browne
@mcavoj This looks good to me. I just had a few small questions and comments here. Do we want to add the documentation in this MR or a different one?
added pipelinetier-3 pipeline:run-e2e-omnibus-once labels and removed pipelinetier-2 label
- Resolved by Martin Čavoj
- Resolved by Martin Čavoj
- Resolved by Martin Čavoj
- Resolved by Martin Čavoj
- Resolved by Martin Čavoj
- Resolved by Martin Čavoj
added 1 commit
- f2d5fa9a - Add a test for id format and reword spec descriptions
reset approvals from @allison.browne by pushing to the branch
mentioned in merge request !175239 (merged)
requested review from @allison.browne
Thanks @mcavoj, I've set this to auto-merge. Nice work and collaboration here!
started a merge train
mentioned in commit b4998aa8
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-staging label and removed workflowproduction label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in issue #507831 (closed)
mentioned in merge request !177266 (merged)
mentioned in merge request gitlab-com/www-gitlab-com!137648 (merged)
mentioned in merge request !178072 (merged)