Skip to content

Define a separte stage for dependent jobs

Ritesh Raj Sarraf requested to merge wip/ritesh/add-dependent-stages.main into main

In older versions of Gitlab ( < 14.x), dependent jobs need to be separately defined in different stages.

Quoting the Gitlab help on this topic:

needs: is similar to dependencies: in that it needs to use jobs from
prior stages, meaning it is impossible to create circular dependencies
or depend on jobs in the current stage (see gitlab-ce#65505).

This requirement/behavior was changed with Gitlab (> 14.1), wherein one should be able to use needs for jobs in the same stage if you enable the :ci_same_stage_job_needs feature flag

To enable backward compatibility with older Gitlab (13.x), this proposed change ensures that dependent jobs have distinct stages defined

Signed-off-by: Ritesh Raj Sarraf ritesh.sarraf@collabora.com

Merge request reports

Loading