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
我能做上面这样的事吗?请建议。