TIL the difference between optional and blocking manual jobs in GitLab CI
To create an optional job in GitLab CI, add when: manual to the job
configuration. However, the location of when: manual determines the type of
manual job created:
- If defined outside
rules, the job will default toallow_failure: true, making it optional. In this case, the pipeline can succeed - subsequent jobs can continue to run - if the manual job is not run or fails. - If defined inside
rules, the job defaults toallow_failure: false, making it blocking. The pipeline will stop at the stage where the job is defined. The blocking manual job must be run for the rest of the pipeline to proceed.