I have a Powershell script which runs some Unity unit tests. On fail, this returns code 1, which Jenkins interprets as a fail and stops the current build. How do I avoid this behavior?
NOTE: This question is almost identical to this one, but that one uses bash, so I cannot apply it to my problem. In other words, how do I mimic the set +e behavior in Powershell? Alternatively, how do I tell Jenkins to ignore these script return codes and to continue the build anyway?
exit 0clause in my script, after running the unit testing, but this seems like going around the problem, instead of solving it.try { } catch { }block, or to usepowershellwithreturnStatus: true(e.g.def retVal = powershell(script: '<your-script>, returnStatus: true). jenkins.io/doc/pipeline/steps/workflow-durable-task-step/…