reload-job tries to find a nearest job for a hint if specified job isn't found.
Unfortunately, it tries to search it only through AbstractProject so other types are ignored completely.
The similar code is in AbstractItem.resolveForCLI().
reload-job tries to find a nearest job for a hint if specified job isn't found.
Unfortunately, it tries to search it only through AbstractProject so other types are ignored completely.
The similar code is in AbstractItem.resolveForCLI().
Code changed in jenkins
User: Jesse Glick
Path:
core/src/main/java/hudson/cli/AbstractBuildRangeCommand.java
core/src/main/java/hudson/cli/BuildCommand.java
core/src/main/java/hudson/cli/ConsoleCommand.java
core/src/main/java/hudson/cli/DeleteBuildsCommand.java
core/src/main/java/hudson/cli/ListChangesCommand.java
core/src/main/java/hudson/cli/ReloadJobCommand.java
core/src/main/java/hudson/cli/RunRangeCommand.java
core/src/main/java/hudson/cli/SetBuildDescriptionCommand.java
core/src/main/java/hudson/cli/SetBuildDisplayNameCommand.java
core/src/main/java/hudson/model/AbstractItem.java
test/src/test/java/hudson/cli/AbstractBuildRangeCommand2Test.java
test/src/test/java/hudson/cli/AbstractBuildRangeCommandTest.java
test/src/test/java/hudson/cli/ReloadJobCommandTest.java
test/src/test/java/hudson/cli/RunRangeCommand2Test.java
test/src/test/java/hudson/cli/RunRangeCommandTest.java
http://jenkins-ci.org/commit/jenkins/33afbcc87f783e4b2ea79ef1a77e9bbef6e6b837
Log:
Make all CLI commands compatible with Pipeline where possible (#2874)
JENKINS-34716Generalizing doPolling and schedulePolling.