Draft: Include dependent child pipelines coverage into root parent pipeline's
requested to merge ci-child-pipelines-coverage-reports into ci-reports-to-include-child-pipeline-jobs
What does this MR do?
Related to #280818
TODO:
-
fix MR widget that shows code coverage because it only looks for coverage jobs in the same pipeline. This should be abstracted and provided by backend. E.g. create a job rspec
in parent pipeline that outputs code coverage value and arspec
job in the child pipeline that does the same with a different value. The MR widget should return an averaged coverage report.
The screenshot above should show 2 jobs (instead of 1) and an average of the 2 coverage values
Screenshots (strongly suggested)
# .gitlab-ci.yml
rspec:
stage: test
script:
- echo "running rspec..."
- echo "Code coverage 80"
coverage: /Code coverage \d+/
trigger-tests:
stage: test
trigger:
include: child.yml
strategy: depend
# child.yml
rspec:
script:
- echo "Running tests..."
- echo "Code coverage 40"
coverage: /Code coverage \d+/
karma:
script:
- echo "running karma tests..."
- echo "Code coverage 30"
coverage: /Code coverage \d+/
We should expect that code coverage report for the parent pipeline is rspec: 60
and karma: 30
. These values should also be available in the repository analytics.
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 Fabio Pitino