Support Code Coverage Badge for Successful Job without Successful Pipeline
Problem to solve
Currently, to have the code coverage badge successfully display, your project needs to have at least one successful pipeline. This is limiting to users that have blocking manual deploy jobs, as their pipelines don't always complete successfully. This feature request proposes code coverage badges for jobs that don't rely on a successful pipeline.
For example, a user has the following code coverage badge on their project's
coverage job successfully completes and they have a coverage percentage for that job. However, their pipeline does not successfully complete because there are blocking manual deploy tasks. They see
coverage: unknown on the badge.
From the customer:
If I’m pointing the badge to a job, the job has a coverage value on it then report that value for the master branch. Coverage values should reflect the state of the branch code. Coverage has nothing to do with deployment, versions or packaging state (I’d be interested to hear a valid use case otherwise).
Customer ticket --> https://gitlab.zendesk.com/agent/tickets/113248 (internal use only)
Delaney, Development Team Lead, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#delaney-development-team-lead
Sasha, Software Developer, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#sasha-software-developer
Sidney, Systems Administrator, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#sidney-systems-administrator
This would increase the availability of the code coverage badge to customers that have blocking manual jobs in their pipelines.
The code coverage report code base requires that a successful pipeline be present in the project. Make it possible to get a code coverage report from a successful job even if the pipeline is unsuccessful. Potentially just retrieve the latest pipeline, rather than the latest successful pipeline. Or have the option to do so.
Permissions and Security
No specific permissions indicated in the current documentation.
Will update the test code coverage badge documentation.
What does success look like, and how can we measure that?
Users will be able to see their code coverage badge display correctly for a successful job regardless if the pipeline was successful.
Links / references