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

Declarative Pipeline: java.lang.IllegalStateException: Can't send a remote FilePath to a different remote channel with a "when - expression" clause

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      * CloudBees Jenkins 2.73.3.1-rolling (Jenkins LTS 2.73.3 Core)
      * Declarative Pipeline 1.2.5
    • Similar Issues:

      Description

      Hello here!

       

      I am currently trying to build a Declarative Pipeline with a conditional stage.

      The condition should be triggered by the result of a shell command on my project (following the pipeline-as-glue pattern: my developer needs to know this on another environments as Jenkins, so using a script).

      This shell command respond the string "false" or "true".

      Based on this feedback, then I run the stage or not.

       

      After some digging, it appears calling a "sh" step within an expression is no longer working: it throws the following exception "

      java.lang.IllegalStateException: Can't send a remote FilePath to a different remote channel

       

      I tried the pipeline on  https://jenkins.io/blog/2017/01/19/converting-conditional-to-pipeline/#longer-pipeline  and I got the same error.

       

      Here is the full exception: https://gist.github.com/dduportal/7ae612501b848a55ad29fe421d775b96

      I am currently trying with a shared library to see if the same issue occurs, I'll let you know.

      Don't hesitate to ask if you miss information from me.

      Thanks in advance for your time!

        Attachments

          Issue Links

            Activity

            dduportal Damien Duportal created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Component/s pipeline-model-definition-plugin [ 21706 ]
            Component/s declarative-pipeline-when-conditions-plugin [ 23168 ]
            abayer Andrew Bayer made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR #223 (Web Link)" [ 18143 ]
            abayer Andrew Bayer made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                dduportal Damien Duportal
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: