problem:There are multiple execution shells configured in Jenkins, and there are subsequent execution job tasks. But one of the execute shell executions failed, causing the subsequent shell to not execute.and this failed shell doesn't have to be executed.
Workaround:Execute Shell Click "Advanced" and enter 1 in the expanded exit code to set build unstableif the shell fails to execute, the result of Jenkins will not be failure, but unstable If there is a job to be performed later, depending on the current build result, you can choose stable or unstable but not failed to determine whether or not to trigger. So Jenkins executes success or unstable can continue to execute the next job.
examples are as follows:There are two execute shells, the first shell is problematic, the path to the CD does not exist when exit code to set build unstable is not set in advanced, the result is as follows:only the first shell is executed, and the Jenkins execution result is finished:failure (red) after setting the exit code to set build Unstable=1, the following results are executed:The first shell execution failed in time, the second shell was executed, and Jenkins executed the result as finished:unstable
Jenkin unnecessary execute shell execution fails, which causes Jenkins to fail to resolve