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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • * CloudBees Jenkins 2.73.3.1-rolling (Jenkins LTS 2.73.3 Core)
      * Declarative Pipeline 1.2.5

      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!

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

              Created:
              Updated:
              Resolved: