Implement allowing jobs to need stages
What does this MR do?
Related to #220758
This MR implements needs:stage
for DAG jobs. With this, a job can "need" a whole stage, instead of writing each job in it.
The main idea behind the implementation is to expand the needed stage into jobs. Then everything will work as it already does.
Notes:
- This is behind a feature flag
ci_dag_needs_stage
=> #285134 (closed). I couldn't make it dependent on a project so it is now a global FF. - frontend needs #254974
- We need to fix the duplicate jobs problem in a separate issue #37655 (closed)
Screenshots (strongly suggested)
build1:
stage: build
script: sleep 3
build2:
stage: build
script: sleep 8
test:
stage: test
script: sleep 1
needs:
- stage: build
deploy:
stage: deploy
script: sleep 1
needs:
- stage: build
- stage: test
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Furkan Ayhan