jenkins_badges
Version 1.2.0
jenkins_badges 是一個小型 Flask 應用程序,可根據 Jenkins CI 的資料提供動態徽章映像。
端點 | 範例 | 預設 |
---|---|---|
覆蓋範圍/<JenkinsJob> | 80%+ | |
20%-80% | ||
< 20% | ||
取得覆蓋資料時出錯 |
$ 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 ()
輸出:
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
麻省理工學院許可。有關更多詳細信息,請參閱捆綁的許可證文件。