jenkinsci / badge-plugin

Jenkins Badge plugin
https://plugins.jenkins.io/badge/
MIT License
32 stars 43 forks source link

Retrieve badges/text #23

Closed ZenithDK closed 4 years ago

ZenithDK commented 4 years ago

All the current supported functions add text/badges etc, but there's no functions for accessing this later. We use the addShortText to print the number of passed/failed/unstable/total test cases for each build, but if I want to draw a graph based on this data later - I cannot access it. I realize this may be niche, and considering no one else seems to miss this it may not be worth the effort, but it would be nice for our use-case.

bakito commented 4 years ago

Hi As far as I understand your requirement, you want to access the results of your test cases within the same build. Is that correct. If so, why don't you store the values within global variables in your job?

This would be easier than to retrieve and parse the summary text.

Regards,

Marc

ZenithDK commented 4 years ago

I wanted to do post-processing and I have the results I want in the badges for each build. If I can't access it that way, I have to go and redo the post-processing to get the results again, which is a major bother due to how our CI works.

bakito commented 4 years ago

I don't get your usecase. Perhaps you could discribe it by providing a pipeline example or even create a pull request. With the information currently provided I would't even know what to extend.