WIP: Resolve "Fail build if coverage too low"
requested to merge udl/gitlab-ce:14974-add_options_to_fail_build_and_pipeline_if_coverage_low into master
What does this MR do?
-
It adds two options to gitlab-ci.yml:
global level:
allowed_coverage_decline
build level:
minimum_coverage
allowed_coverage_decline
Is a value between 0 and 100. If it is given, the pipeline coverage will be compared to the last successful build in this branch or in the default branch. If the coverage declined more than the specified amount, the pipeline will fail.
minimum_coverage
Is a value between 0 and 100. If it is given, the build will fail if it's coverage is below this threshold.
Are there points in the code the reviewer needs to double check?
- I don't know how to determine if all subjobs have finished for a build
- I don't know how to tell the CI system, that the failed job shouldn't be retried automatically
Why was this MR needed?
It is part of my technical interview. (pinging @grzesiek , @ayufan )
Things I would have done if I had more time
- changelog entry
- specs for the pipeline part
- integration test
- documentation
- ask someone about the TODOs
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a UX Designer -
Has been reviewed by a Frontend maintainer -
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #14974 (closed)
Edited by Udo Groebner