pan berecik created JENKINS-14023:
-------------------------------------
Summary: System.exit (13) in a groovy script causes Jenkins
shutdown
Key: JENKINS-14023
URL: https://issues.jenkins-ci.org/browse/JENKINS-14023
Project: Jenkins
Issue Type: Bug
Components: groovy
Affects Versions: current
Environment: Solaris
Reporter: pan berecik
Assignee: vjuranek
I want to return an error from my groovy script and used for it
System.exit(13).It caused shutdown of jenkins.
The script was startet using jenkins-cli.
...
if(args.length < 2){
System.exit(13)
}
...
Finally I found a workaround and use RuntimeException in my script and the job
finished as expected as failed. But jenkins cann still continue his work :)
...
if(args.length < 2){
throw new RuntimeException("Mandatory Parameter BRANCH_NAME is missing!
Operation ist aborted!")
}
...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira