'needs:' with logical OR
Release notes
Allows job to start if either one of its dependencies specified in needs: is satisfied
Problem to solve
I want to be able to configure a stage with jobs so that either one of them being successful would unblock the next stage. Ex: first stage would have a:
- regular job that would be doing an API call and might fail
- manual job that would be doing nothing, but unblocking the execution of next stage
Then the pipeline would continue when either of jobs succeeded. Real life example:
I want to introduce control/feature flag stage for merge request pipeline. This will be a very first stage of pipeline with two jobs:
- checks if we already have deployed dynamic environment for this merge request or fail
- manual job that would be an empty job
Build stage job would be requiring either of 1. or 2. jobs to succeed.
As a result I will have my pipeline run for already deployed environments automatically but require a human interaction for a fresh setup.