We have a complex Gitlab pipeline, we've split the stages into different files and they are run based on the branch and source.
I'm trying to set up a schedule job to run that will just run one section of the pipeline, to do this I'm trying to use rules to ignore all other stages I don't want to run by doing something like this e.g.
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
The problem is the stages also have a manual rule so even though I say skip if a schedule the pipeline still asks for a manual interaction:
rules:
- if: $CI_COMMIT_BRANCH == "master"
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- when: manual
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
Is there a way I can skip this stage when the source is a "schedule" but still have the manual step for the other scenarios?