如何查找jenkins中的Job失败

时间:2014-11-27 14:26:33

标签: shell jenkins

I am really new to Jenkins and shell scripts, I just want to know if I have a set of commands which are configured in a build, is there any simple way to know if the job failed or the set of commands terminated to due some reason?

例如,在configure job下如果我们有一组shell命令,如下所示,我可以将它们嵌入if语句中,如下所示:

if [   ${jenkinsHome}/doThis.sh > andThis.sh
    ${jenkinsHome}/nowDOThis.sh > ${workpsace}/commit.sh
    ${workpsace}/test.sh test
    ]
  then
   echo "build passed"
  else 
    echo "failed"
  fi

我能做上面这样的事吗?请建议。

0 个答案:

没有答案