don't fail jenkins build if execute shell fails

前端 未结 14 1215
无人共我
无人共我 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:48

    There is another smooth way to tell Jenkins not to fail. You can isolate your commit in a build step and set the shell to not fail:

    set +e
    git commit -m "Bla."
    set -e
    

提交回复
热议问题