Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30785

reload-job CLI command tries to find nearest for a hint only throught AbstractProject

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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().

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            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)

            • [FIX JENKINS-30785] Generalize some CLI stuff to AbstractItem
            • Offering default methods on ParameterizedJob.
            • Javadoc typo.
            • Cleaner use of default methods in ParameterizedJob.
            • Sketch of pulling disabled functionality into ParameterizedJob.
            • EnableJobCommandTest.groovy → EnableJobCommandTest.java, and replacing deprecated Remoting-based CLI calls with CLICommandInvoker.
            • All CLI commands could be broken by a missing CLI.*.shortDescription key on just one!
            • Forgot to move CLI method short descriptions to new package.
            • Needed a @CLIResolver for ParameterizedJob. Adding an OptionHandler while we are here.
            • Trying to fix up access-modifier versions; started failing in CI today for unknown reasons.
            • Introduced <p:makeDisabled/> by analogy with <p:config-disableBuild/>.
            • Using new type bounds.
            • access-modifier 1.11 released.
            • MatrixProject and MavenModuleSet both expect to have access to makeDisabled.jelly.
            • Trying to generalize some more.
            • Minor simplification.
            • isBuildable
            • Obsolete comment.
            • Updated comments.
            • bridge-method-injector 1.17
            • Unfortunately AbstractProject.schedulePolling cannot delegate to SCMTriggerItem.
            • Making delete-builds and list-changes commands work with Pipeline.
            • [FIXED JENKINS-41527] Made console CLI command compatible with Pipeline.
            • Fixed set-build-description and set-build-display-name.
            • @oleg-nenashev agreed it would be clearer to explicitly mark commands as restricted, not APIs.
            • Updated tests to match slight message changes.
            • bridge-method-injector 1.17
            • @olivergondza pointed out that RunRangeCommand is a better name than JobRangeCommand.
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - 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) [FIX JENKINS-30785] Generalize some CLI stuff to AbstractItem Offering default methods on ParameterizedJob. Javadoc typo. Cleaner use of default methods in ParameterizedJob. Need to pick up https://github.com/infradna/bridge-method-injector/pull/15 to be able to build. Sketch of pulling disabled functionality into ParameterizedJob. EnableJobCommandTest.groovy → EnableJobCommandTest.java, and replacing deprecated Remoting-based CLI calls with CLICommandInvoker. All CLI commands could be broken by a missing CLI.*.shortDescription key on just one! Forgot to move CLI method short descriptions to new package. Needed a @CLIResolver for ParameterizedJob. Adding an OptionHandler while we are here. Trying to fix up access-modifier versions; started failing in CI today for unknown reasons. Introduced <p:makeDisabled/> by analogy with <p:config-disableBuild/>. Using new type bounds. access-modifier 1.11 released. MatrixProject and MavenModuleSet both expect to have access to makeDisabled.jelly. Trying to generalize some more. Minor simplification. JENKINS-34716 Generalizing doPolling and schedulePolling. isBuildable Obsolete comment. Updated comments. bridge-method-injector 1.17 Unfortunately AbstractProject.schedulePolling cannot delegate to SCMTriggerItem. Making delete-builds and list-changes commands work with Pipeline. [FIXED JENKINS-41527] Made console CLI command compatible with Pipeline. Fixed set-build-description and set-build-display-name. @oleg-nenashev agreed it would be clearer to explicitly mark commands as restricted, not APIs. Updated tests to match slight message changes. bridge-method-injector 1.17 @olivergondza pointed out that RunRangeCommand is a better name than JobRangeCommand.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/test/java/org/jenkinsci/plugins/workflow/job/CLITest.java
            http://jenkins-ci.org/commit/workflow-job-plugin/9eb3cbf25a4c30bc4b9e07e0079888b62ad947f0
            Log:
            JENKINS-30785 Integration test.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/test/java/org/jenkinsci/plugins/workflow/job/CLITest.java http://jenkins-ci.org/commit/workflow-job-plugin/9eb3cbf25a4c30bc4b9e07e0079888b62ad947f0 Log: JENKINS-30785 Integration test.

              People

              • Assignee:
                danielbeck Daniel Beck
                Reporter:
                pajasoft Pavel Janoušek
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: