Build step 'Execute shell' marked build as failure

shell 腳本遠程調用執行如下:
/usr/bin/ssh 10.1.2.3 '/bin/bash /root/ReServer.sh'
報錯如下:
Build step 'Execute shell' marked build as failure

本地執行是ok,怎麼執行都報錯,後來折騰了老半天,一步一步的打輸出,發現:
Build step 'Execute shell' marked build as failure
原來是腳本在判斷進程是否存在的同時,這個結束進程剛好有同樣的匹配串!
ps -aux | grep "idiot" | grep -v grep | grep -v '$$' | awk '{print $2}'
所以修改idiot,做精確匹配解決"sb idiot"

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