1
A
回答
1
退房https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/HealthReport.java
然後,您可以找到下面的代碼有:
// These are now 0-20, 21-40, 41-60, 61-80, 81+ but filenames unchanged for compatibility
private static final String HEALTH_OVER_80 = "icon-health-80plus";
private static final String HEALTH_61_TO_80 = "icon-health-60to79";
private static final String HEALTH_41_TO_60 = "icon-health-40to59";
private static final String HEALTH_21_TO_40 = "icon-health-20to39";
private static final String HEALTH_0_TO_20 = "icon-health-00to19";
private static final String HEALTH_OVER_80_IMG = "health-80plus.png";
private static final String HEALTH_61_TO_80_IMG = "health-60to79.png";
private static final String HEALTH_41_TO_60_IMG = "health-40to59.png";
private static final String HEALTH_21_TO_40_IMG = "health-20to39.png";
private static final String HEALTH_0_TO_20_IMG = "health-00to19.png";
private static final String HEALTH_UNKNOWN_IMG = "empty.png";
的代碼表明,如果你成功建立超過80%,你會看到陽光燦爛天氣圖標。
如果您的成功構建在60%-79%之間,您會看到一個名爲health-60to79
的圖像。
...
您可以在https://github.com/jenkinsci/jenkins/blob/master/war/images找到圖像。它們被命名爲health-00to19.svg
,health-20to39.svg
,health-40to59.svg
,health-60to79.svg
和health-80plus.svg
。
HealthReport
是用於更新天氣圖標
public HealthReport(int score, String iconUrl, Localizable description) {
this.score = score;
if (score <= 20) {
this.iconClassName = HEALTH_0_TO_20;
} else if (score <= 40) {
this.iconClassName = HEALTH_21_TO_40;
} else if (score <= 60) {
this.iconClassName = HEALTH_41_TO_60;
} else if (score <= 80) {
this.iconClassName = HEALTH_61_TO_80;
} else {
this.iconClassName = HEALTH_OVER_80;
}
if (iconUrl == null) {
if (score <= 20) {
this.iconUrl = HEALTH_0_TO_20_IMG;
} else if (score <= 40) {
this.iconUrl = HEALTH_21_TO_40_IMG;
} else if (score <= 60) {
this.iconUrl = HEALTH_41_TO_60_IMG;
} else if (score <= 80) {
this.iconUrl = HEALTH_61_TO_80_IMG;
} else {
this.iconUrl = HEALTH_OVER_80_IMG;
}
} else {
this.iconUrl = iconUrl;
}
this.description = null;
setLocalizibleDescription(description);
}
機制
相關問題
- 1. 自定義詹金斯的項目的天氣報告
- 2. 更改詹金斯報告的顏色
- 3. 如何在構建腳本失敗後讓詹金斯報告?
- 4. 通過詹金斯環境變量值詹金斯的作業構建參數
- 5. 配置作業「詹金斯」
- 6. 訪問詹金斯CI構建和報告上的IOS設備
- 7. 詹金斯插件彙總/彙總構建報告
- 8. 在詹金斯任何構建作業之前上傳文件
- 9. 子模塊的Cobertura詹金斯報告
- 10. 詹金斯的Checker Framework報告?
- 11. 放置一個詹金斯作業使用詹金斯作業生成器
- 12. 詹金斯:構建作業的重要分支鏈條
- 13. 詹金斯2先前構建作業中的鬆散參數
- 14. 詹金斯構建與java.lang.InterruptedException
- 15. 配置構建詹金斯
- 16. 詹金斯和Android構建
- 17. 詹金斯 - 如何阻止構建流?
- 18. 我如何中止詹金斯構建
- 19. 詹金斯管道發佈HTML報告
- 20. 詹金斯從XML文件報告
- 21. 詹金斯JUnit報告maven項目
- 22. 更新詹金斯工作變量
- 23. 詹金斯作業Windows PowerShell腳本$ lastexitcode沒有失敗的詹金斯工作
- 24. 獲取詹金斯上游作業
- 25. 詹金斯僅多個作業
- 26. 在詹金斯DSL執行cron作業
- 27. 詹金斯作業無法從GitHub
- 28. 如何配置詹金斯的PHP覆蓋率報告?
- 29. 的Maven構建與詹金斯
- 30. 詹金斯在生成的報告中構建在碼頭集裝箱內