jenkins_badges
Version 1.2.0
jenkins_badges is a small flask app that serves dynamic badge images based on data from Jenkins CI.
Endpoint | Examples | Default |
---|---|---|
coverage/<JenkinsJob> | 80% + | |
20%-80% | ||
< 20% | ||
error getting coverage data |
$ pip install jenkins_badges
import jenkins_badges
#path to your jenkins instance
base_url = "https://example.com/jenkins"
# not required if anonymous jenkins user has read access
username = "apiuser" #a user with read access
token = "6c3bde145bcda49402b6914f2353a734" #user's token
app = jenkins_badges.create_app(base_url=base_url,
username=username,
token=token)
app.run()
Output:
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
MIT licensed. See the bundled LICENSE file for more details.