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

CopyToSlave: Variables doesn't work in custom workspaces

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: copy-to-slave-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.566
      CopyToSlave 1.4.3
      Ubuntu 14.04.
    • Similar Issues:

      Description

      When using a variable in a custom workspace, it doesn't get replaced for copy-to-slave.

      I see correctly "Building remotely on Jenkins-Worker-01 (Remote-Worker) in workspace /var/lib/jenkins/jobs/a_name/workspace" in the log and "/var/lib/jenkins/jobs/a_name/workspace" is the $PARAMETER. But the copytoslave uses $PARAMETER as a string...
      Interesting point is, it gets resolved correctly for the slave, but not the master.

      How to reproduce:

      • Creating a project with "Use custom workspace: $PARAMETER"
      • Enable "Copy files into the job's workspace before building" with "This job's workspace on the master (not advised)"
      • Start the build with $PARAMETER=/var/lib/jenkins/jobs/a_job/workspace/

      Got:
      [copy-to-slave] Copying '.,*', excluding '/.git/,*/.gitignore', from 'file:/$%7BPARAMETER%7D' on the master to 'file:/var/lib/jenkins/jobs/a_job/workspace/' on 'slave'.

      Expected:
      [copy-to-slave] Copying '.,*', excluding '/.git/,*/.gitignore', from 'file:/var/lib/jenkins/jobs/a_job/workspace/' on the master to 'file:/var/lib/jenkins/jobs/a_job/workspace/' on 'slave'.

        Attachments

          Activity

          Hide
          mlacroix marceau lacroix added a comment -

          got a similar issue while trying to use jenkins level variable as an output directory for the "copy back to master" functionality.

          > [copy-to-slave] Copying 'FILENAME', excluding nothing from [...] to 'file:/$%7BRESULT_PATH%7D' on the master.

          Show
          mlacroix marceau lacroix added a comment - got a similar issue while trying to use jenkins level variable as an output directory for the "copy back to master" functionality. > [copy-to-slave] Copying 'FILENAME', excluding nothing from [...] to 'file:/$%7BRESULT_PATH%7D' on the master.
          Hide
          jhrabi Jason Hrabi added a comment -

          Variable support also needed for the Override destination folder for configuring copying files back to the master.

          Show
          jhrabi Jason Hrabi added a comment - Variable support also needed for the Override destination folder for configuring copying files back to the master.
          Hide
          longk15t Long Tran added a comment -

          I got this too on jenkins 2.89.2, copy to slave plugin version 1.4.4

          Show
          longk15t Long Tran added a comment - I got this too on jenkins 2.89.2, copy to slave plugin version 1.4.4

            People

            • Assignee:
              svvivek Vivekanand SV
              Reporter:
              kfritsche Karl Fritsche
            • Votes:
              6 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: