在實際工作中,Jenkins Job會有很多狀態。但實際有一種狀態 Unstable有時候讓人很模糊。
那我們看看官網解釋吧
Unstable The Build had some errors but they were not fatal. A Build is unstable if it was built successfully and one or more publishers report it unstable. For example if the JUnit publisher is configured and a test fails then the Build will be marked unstable.
這是什麼意思呢?
直白一點:構建腳本中的命令都成功(返回錯誤碼爲0)了,也生成了XML報告,但實際報告中有錯誤的數據或用例
構建後的腳本調用了Junit 的插件,這時插件分析XML有錯誤,就認爲這個JOB爲unstable.