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

"console" CLI command does not work with Pipeline projects

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have a simple Pipeline defined named pirateship.

      I am able to build with the CLI:

      ➜  ~  ssh -p 22222 -l admin localhost build -s  pirateship 
      Started pirateship #12
      Completed pirateship #12 : SUCCESS
      ➜  ~  
      

      Using the console command does not work however:

      ➜  ~  ssh -p 22222 -l admin localhost console pirateship
      
      ERROR: No such job 'pirateship'; perhaps you meant 'build-all-software'?
      ➜  ~  
      

      Jesse Glick suggested that the fix may be similar to the fix for JENKINS-28071

        Attachments

          Issue Links

            Activity

            Show
            danielbeck Daniel Beck added a comment - https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/cli/ConsoleCommand.java#L33
            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/194069478b30128a5e1fee94cde701a6699cc76b
            Log:
            JENKINS-41527 Integration test for console.

            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/194069478b30128a5e1fee94cde701a6699cc76b Log: JENKINS-41527 Integration test for console.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                rtyler R. Tyler Croy
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: