java -jar jenkins-cli.jar build -s currently-disabled-job throws an error:
java.lang.NullPointerException at hudson.cli.BuildCommand.run(BuildCommand.java:135)
The reason is that AbstractProject.scheduleBuild2 can return null, though it is not yet marked @CheckForNull.
The CLI command should instead fail with a polite message saying that a build could not be scheduled. (The project being disabled is the most likely cause, though there may be others as well.)
[JENKINS-17603] NPE trying to use CLI to build disabled job
Assignee | New: Laurence North [ lnorth ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 148782 ] | New: JNJira + In-Review [ 192872 ] |