feat(jenkins): add metric parameter support for apiv4 coverage plugin [Jenkins]#11794
Open
ashif323 wants to merge 1 commit intobadges:masterfrom
Open
feat(jenkins): add metric parameter support for apiv4 coverage plugin [Jenkins]#11794ashif323 wants to merge 1 commit intobadges:masterfrom
ashif323 wants to merge 1 commit intobadges:masterfrom
Conversation
Contributor
559a99d to
922c182
Compare
The apiv4 format now supports a 'metric' query parameter allowing users to choose which coverage metric to display from the new Jenkins coverage plugin (io.jenkins.plugins.coverage). Supported metrics: line (default), branch, instruction, method, module, file Also updated the description to mention the new Coverage Plugin. Closes badges#11689
922c182 to
1a0c05f
Compare
Member
|
Hello @ashif323 👋🏻 Do you have an example of live Jenkins job that uses the new plugin? |
Contributor
Author
|
Hi @PyveB 👋 I don't have a live Jenkins job available right now. Could you guide me on what would be the best way to provide a working example? I'm happy to set one up if needed to get this PR over the line! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes #11689
Adds support for the new Jenkins Coverage Plugin (
io.jenkins.plugins.coverage) by extending the existingapiv4format with an optionalmetricquery parameter.Why
The
apiv4format previously only supportedlinecoverage. The new Jenkins Coverage Plugin exposes multiple metrics (branch,instruction,method,module,file) that users may want to display as badges.How
metricquery parameter toqueryParamSchema(valid values:line,branch,instruction,method,module,file, default:line)apiv4schema to accept all metrics as optional fieldsapiv4transform to use the selected metrichandlemethod to passmetricto transformExample