WIP: Solve composite status of skipped needs of ci pipelines
What does this MR do?
Related to #213080 (closed)
More explanation is in the summary section of the issue.
The idea behind this MR is very similar to !31624 (closed)
It means that,
needs
should not care about whether dependent jobs are failed or succeeded. The goal ofneeds
is whether dependent jobs are completed or not.when
keyword of the job should decide if dependent jobs need to be success or failure.
However, I did not make the same changes of the previous MR about "app/services/ci/process_build_service.rb".
Example 1
build_1:
stage: build
script: exit 0
build_2:
stage: build
script: exit 1
test:
stage: test
script: exit 0
deploy:
stage: deploy
script: exit 0
needs: [build_1, test]
According to this MR; in this example, deploy should be skipped and the pipeline should be failed.
Example 2
build_1:
stage: build
script: exit 0
build_2:
stage: build
script: exit 0
test:
stage: test
script: exit 0
when: on_failure
deploy:
stage: deploy
script: exit 0
needs: [build_1, 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