Skip to content

Draft: Include dependent child pipelines coverage into root parent pipeline's

What does this MR do?

Related to #280818


  • 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 a rspec 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
  stage: test
    - echo "running rspec..."
    - echo "Code coverage 80"
  coverage: /Code coverage \d+/

  stage: test
    include: child.yml
    strategy: depend
# child.yml
    - echo "Running tests..."
    - echo "Code coverage 40"
  coverage: /Code coverage \d+/

    - 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?


Availability and Testing


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

Merge request reports