[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_ciconfiguration:-
allowed: boolean (default: false) -
exceptions: object-
users: array of user IDs
-
-
- Modify the pipeline creation logic to check the
skip_ciconfiguration when a Pipeline Execution Policy is applied:- If
skip_ci.allowedis false, ignore the[skip ci]annotation unless the user is in theexceptions.userslist. - If
skip_ci.allowedis 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_ciconfiguration. - Implement validation for the
skip_ciconfiguration to ensure:-
allowedis a boolean value -
exceptions.userscontains valid user IDs
-
- Update the relevant services and controllers to handle the new
skip_cilogic when applying Pipeline Execution Policies. - Write unit and integration tests to cover the new functionality.
Acceptance Criteria
- The backend correctly processes the
skip_ciconfiguration in Pipeline Execution Policies. - Pipelines are created or skipped according to the
skip_cisettings and user exceptions. - API endpoints for Pipeline Execution Policies accept and validate the new
skip_ciconfiguration. - All new code is covered by appropriate tests.
Related Links
Edited by Alan (Maciej) Paruszewski