badges / shields

Concise, consistent, and legible badges in SVG and raster format
https://shields.io
Creative Commons Zero v1.0 Universal
23.45k stars 5.49k forks source link

badge request - buildbot #6837

Open grooverdan opened 3 years ago

grooverdan commented 3 years ago

:clipboard: Description Build CI system

buildbot is an open source build system. Anyone running buildbot has the same API built available.

This would show the build status for a builder like ; "builder | build status"

:link: Data

Is there a public API? yes

e.g.

$ curl https://buildbot.mariadb.org/api/v2/builders/amd64-rhel8-dockerlibrary/builds?limit=1&order=-number | jq '.builds[0].state_string'

"build successful"

is a string, however taking the $.builds[0].results and translating that to a string/style would be useful.

Does the API requires an API key? no

Link to the API documentation:

for build: http://docs.buildbot.net/current/developer/raml/build.html#endpoints results codes: http://docs.buildbot.net/current/developer/results.html#build-result-codes

:microphone: Motivation

This is a good gain for the large community of buildbot users who end up with lots of builders and tests that need a status page.

I wanted an additional page to reflect the current state of testing of the upstream developed mariadb to add to the existing pages reflecting CI at other stages of docker:

https://github.com/MariaDB/mariadb-docker#current-ci-status

I managed to get https://img.shields.io/badge/dynamic/json?label=buildbot%20CI%20upstream&query=$.builds[0].state_string&url=https%3A%2F%2Fbuildbot.mariadb.org%2Fapi%2Fv2%2Fbuilders%2Famd64-rhel8-dockerlibrary%2Fbuilds%3Flimit%3D1%26order%3D-number going as a text status.

PyvesB commented 3 years ago

Hello @grooverdan ! 👋🏻

Seems like a good suggestion to me. Would you like to contribute this new badge? We've got a nice little tutorial to help you get going!

grooverdan commented 3 years ago

That's a pretty nice tutorial (fyi broken links on 4.2).

My first nodejs app in 2 hrs - https://github.com/badges/shields/compare/master...grooverdan:buildbot?expand=1

Not quite there yet. Comments welcome.

PyvesB commented 3 years ago

That's a pretty nice tutorial (fyi broken links on 4.2).

Thanks for pointing the broken links out, will submit a pull request to fix them in a few moments.

My first nodejs app in 2 hrs - https://github.com/badges/shields/compare/master...grooverdan:buildbot?expand=1

Not quite there yet. Comments welcome.

Seems like a good start to me. Don't forget the tests, they will also give you confidence that the rest is working. 😉