[BE] Add ability to skip_ci to pipeline execution policy YAML mode
Background
This issue is part of the implementation for adding the ability to disable the [skip ci]
restriction for Pipeline Execution Policies. This feature will allow users to specify whether pipelines created from Pipeline Execution Policies can be skipped with [skip ci]
and to define users who should be exempted from that restriction.
Objective
Implement the backend logic to support the new skip_ci
configuration in Pipeline Execution Policies.
Implementation Details
- Update the Pipeline Execution Policy model to include the new
skip_ci
configuration:-
allowed
: boolean (default: false) -
exceptions
: object-
users
: array of user IDs
-
-
- Modify the pipeline creation logic to check the
skip_ci
configuration when a Pipeline Execution Policy is applied:- If
skip_ci.allowed
is false, ignore the[skip ci]
annotation unless the user is in theexceptions.users
list. - If
skip_ci.allowed
is true, honor the[skip ci]
annotation for all users.
- If
- Update the API endpoints for creating and updating Pipeline Execution Policies to accept the new
skip_ci
configuration. - Implement validation for the
skip_ci
configuration to ensure:-
allowed
is a boolean value -
exceptions.users
contains valid user IDs
-
- Update the relevant services and controllers to handle the new
skip_ci
logic when applying Pipeline Execution Policies. - Write unit and integration tests to cover the new functionality.
Acceptance Criteria
- The backend correctly processes the
skip_ci
configuration in Pipeline Execution Policies. - Pipelines are created or skipped according to the
skip_ci
settings and user exceptions. - API endpoints for Pipeline Execution Policies accept and validate the new
skip_ci
configuration. - All new code is covered by appropriate tests.
Related Links
- Epic: &15647
- Merge Request: Add ability to disable
[skip ci]
restriction for Pipeline Execution Policies
Edited by Alan (Maciej) Paruszewski