Skip to content
Snippets Groups Projects

Allow users to configure skip ci behavior for pipeline execution policy

All threads resolved!

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
image image

How to set up and validate locally

  1. Create new group and new project in that group
  2. Create new Pipeline Execution Policy (Secure -> Policies -> Create new -> Pipeline Execution Policy) and merge MR with the policy
  3. Go to project created in 1., modify the file and commit change with [skip ci] annotation. -> Pipeline will run
  4. Now go back to Secure -> Policies and modify the policy created in 2.
  5. Add skip_ci: { allowed: false, allowlist: { users: [{ id: YOUR_USER_ID }] }}
  6. Go to project created in 1., modify the file and commit change with [skip ci] annotation. -> Pipeline will be skipped
  7. Now go back to Secure -> Policies and modify the policy created in 2.
  8. Add skip_ci: { allowed: true }
  9. 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)

Edited by Alan (Maciej) Paruszewski

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • requested review from @Andyschoenen

  • mentioned in merge request !174191 (closed)

  • added 1205 commits

    Compare with previous version

  • Alan (Maciej) Paruszewski changed the description

    changed the description

  • requested review from @Andyschoenen

  • added 1 commit

    Compare with previous version

  • Andy Schoenen approved this merge request

    approved this merge request

  • Andy Schoenen requested review from @mc_rocha and @grzesiek

    requested review from @mc_rocha and @grzesiek

  • 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.

  • :tools: Generated by gitlab_quality-test_tooling.


    :snail: 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: :white_check_mark: test report for f2d5fa9a

    expand 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: :x: test report for f2d5fa9a

    expand 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   | ❌     |
    +-------------+--------+--------+---------+-------+-------+--------+
  • Marcos Rocha
  • mentioned in issue #507354

  • added 1 commit

    • 50c922f7 - Address MR comments and fix failing specs

    Compare with previous version

  • Alan (Maciej) Paruszewski reset approvals from @Andyschoenen by pushing to the branch

    reset approvals from @Andyschoenen by pushing to the branch

  • added 1 commit

    Compare with previous version

  • added 338 commits

    Compare with previous version

  • added 1 commit

    • 5bbcb3ff - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Alan (Maciej) Paruszewski requested review from @allison.browne and removed review request for @grzesiek

    requested review from @allison.browne and removed review request for @grzesiek

  • Marcos Rocha approved this merge request

    approved this merge request

  • Alan (Maciej) Paruszewski changed the description

    changed the description

  • added 1 commit

    • c866bd78 - Apply 2 suggestion(s) to 1 file(s)

    Compare with previous version

  • Alan (Maciej) Paruszewski reset approvals from @mc_rocha by pushing to the branch

    reset approvals from @mc_rocha by pushing to the branch

  • Marcos Rocha approved this merge request

    approved this merge request

  • Martin Čavoj mentioned in merge request !174974 (merged)

    mentioned in merge request !174974 (merged)

  • Martin Čavoj mentioned in merge request !174975 (merged)

    mentioned in merge request !174975 (merged)

  • Martin Čavoj mentioned in merge request !174969 (merged)

    mentioned in merge request !174969 (merged)

  • mentioned in issue #482952 (closed)

  • mentioned in issue #508357 (closed)

  • Martin Čavoj added 1314 commits

    added 1314 commits

    Compare with previous version

  • Martin Čavoj reset approvals from @mc_rocha by pushing to the branch

    reset approvals from @mc_rocha by pushing to the branch

  • Martin Čavoj added 1 commit

    added 1 commit

    • 14b051ca - Add skip_ci to policy content attributes for read model

    Compare with previous version

  • Martin Čavoj changed the description

    changed the description

  • Martin Čavoj added 1 commit

    added 1 commit

    • d9e32d19 - Add skip_ci to policy content attributes for read model

    Compare with previous version

  • Allison Browne
  • Allison Browne
  • Allison Browne
  • Allison Browne approved this merge request

    approved this merge request

  • Martin Čavoj added 1 commit

    added 1 commit

    • f2d5fa9a - Add a test for id format and reword spec descriptions

    Compare with previous version

  • Martin Čavoj reset approvals from @allison.browne by pushing to the branch

    reset approvals from @allison.browne by pushing to the branch

  • Martin Čavoj mentioned in merge request !175239 (merged)

    mentioned in merge request !175239 (merged)

  • requested review from @allison.browne

  • Marcos Rocha approved this merge request

    approved this merge request

  • Allison Browne resolved all threads

    resolved all threads

  • Allison Browne approved this merge request

    approved this merge request

  • Allison Browne enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • Thanks @mcavoj, I've set this to auto-merge. Nice work and collaboration here!

  • Allison Browne mentioned in commit b4998aa8

    mentioned in commit b4998aa8

  • added workflowstaging label and removed workflowcanary label

  • Alan (Maciej) Paruszewski changed the description

    changed the description

  • Martin Čavoj mentioned in merge request !177266 (merged)

    mentioned in merge request !177266 (merged)

  • mentioned in merge request !178072 (merged)

  • Please register or sign in to reply
    Loading