jenkins pipeline獲取shell執行結果和執行狀態碼

獲取執行結果

result = sh(script: "<shell command>", returnStdout: true)

獲取執行狀態碼(0或者非0)

excuteCode = sh(script: "<shell command>", returnStatus: true)

參考文章:https://blog.csdn.net/liurizhou/article/details/86670092

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章