don't fail jenkins build if execute shell fails

前端 未结 14 1241
无人共我
无人共我 2020-12-04 08:08

As part of my build process, I am running a git commit as an execute shell step. However, if there are no changes in the workspace, Jenkins is failing the build. This is be

14条回答
  •  心在旅途
    2020-12-04 08:32

    The following works for mercurial by only committing if there are changes. So the build only fails if the commit fails.

    hg id | grep "+" || exit 0
    hg commit -m "scheduled commit"
    

提交回复
热议问题