本地执行是ok,怎么执行都报错,后来折腾了老半天,一步一步的打输出,发现:
原来是脚本在判断进程是否存在的同时,这个结束进程刚好有同样的匹配串!
ps -aux | grep "idiot" | grep -v grep | grep -v ‘$$‘ | awk ‘{print $2}‘
所以修改idiot,做精确匹配解决"sb idiot"
Build step ‘Execute shell‘ marked build as failure
原文:https://blog.51cto.com/ckl893/2446413