open-build-service
open-build-service copied to clipboard
Badge for github integration
This is a feature request for a badge which shows the build-status on a github project. Would really be great!
There are many ways to go about this:
- Build status of a project, which would be useful for packages that pull elements from many repositories
- Build status of a package, which would be useful for packages built from one source only
- Do we count subpackages from multiple specs into it or should it be split per package?
- Build status of repository/architecture in the project for package, which would be the easiest to implement, considering it's a single status, not multiple statuses
How should it look?
- A percentage of built statuses (works with 1&2)
- A ratio of built statuses (works with 1&2)
- A symbolic representation of built statuses (works with all)
Other concerns:
- Should it mention OBS instance name?
- Should it be made as a set of preset images or on demand (fairly easy to do considering that svg is just an xml document)
There are many ways to go about this:
Build status of a project, which would be useful for packages that pull elements from many repositories
Build status of a package, which would be useful for packages built from one source only
- Do we count subpackages from multiple specs into it or should it be split per package?
Build status of repository/architecture in the project for package, which would be the easiest to implement, considering it's a single status, not multiple statuses
How should it look?
I like the images that you created, so like those ;-)
A percentage of built statuses (works with 1&2)
A ratio of built statuses (works with 1&2)
A symbolic representation of built statuses (works with all)
Other concerns:
- Should it mention OBS instance name?
Imho not necessary, if you embed the badge so that it links to the respective view on that OBS instance, then that information is already available.
- Should it be made as a set of preset images or on demand (fairly easy to do considering that svg is just an xml document)
Hi, this feature is old, but still it would be very convenient to have... Any chance we get something like this? Where/how would this need to be placed? Are there some kind of "after build" trigger/service one can jump in and implement something modular?
Using rabbitmq might be an option, but yet another server/daemon instance is needed to wait for "build finish" events, etc...
Thomas Renninger [email protected] writes:
Hi, this feature is old, but still it would be very convenient to have...
Indeed it would.
Any chance we get something like this? Where/how would this need to be placed? Are there some kind of "after build" trigger/service one can jump in and implement something modular?
I think this could be done far simpler: the badge would be generated
dynamically, essentially reusing the
GET /build/
I think this could be done far simpler: the badge would be generated dynamically, essentially reusing the GET /build/
/ / / /_status route. Instead of returning XML, one would render one of Stasiek's SVGs.
Since this feature is not implemented yet, I just wanted to add building a package on obs to https://kmymoney.org/build.html.
For this I added a small help script to the listed page, which fetches the status from api.opensuse.org and should return a corresponding image.
Unfortunately, this doesn't work because api.opensuse.org expects authorization.
A minimal implementation for this feature, would then be an extension that makes a build status query available without authorization or with an access token.
Another option outside obs would be to fetch the results from the obs project and to parse the build states. Unfortunally this also could not be done easily because the build results are embedded by fetching another url
<div class='bg-light' data-buildresult-url='/package/buildresult' id='buildresult-urls'>
using javascript, which only works in a full browser.
Let me suggest an inspiration that seems relevant to me.
As in this example, repology.org provides multiple badges with metrics and individual repo versions, and also this matrix-badge :