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

CopyToSlave does not work for multiconfiguration builds

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: copy-to-slave-plugin
    • Labels:
      None
    • Environment:
      CentOS
      Jenkins v1.532
      CopyToSlave v1.4
    • Similar Issues:

      Description

      I have a multiconfiguration build with a couple of axii.
      One of them is a slave label (ie: the configurations can only run on slaves).

      I also have custom workspaces for both parent & child builds.
      So for the parent build, I have the workspace defined as ${PARENT_WORKSPACE}, the children have it defined as ${CHILD_WORKSPACE}

      When a configuration is started, I get this:
      [copy-to-slave] Copying '${MY_FILE}', excluding nothing, from 'file:/var/lib/jenkins/jobs/${JOB}/configurations/axis-${FOO}/${FOO_VAL}/axis-label/${SLAVE_LABEL}/axis-${BAR}/${BAR_VAL}/workspace/' on the master to 'file:${CHILD_WORKSPACE}' on '${SOME_SLAVE}'.

      The first part is obviously wrong. It should be copying ${MY_FILE} from ${PARENT_WORKSPACE} into ${CHILD_WORKSPACE} on ${SOME_SLAVE}.

      I've tried using an absolute path for ${MY_FILE} too...and that's where the second problem happens: the file never copies.

        Attachments

          Activity

          Hide
          svvivek Vivekanand SV added a comment -

          Hi Kevin,

          I have just taken the ownership of this plugin, so I have to go through the code. Would do that when I am a little free.

          For now, have you checked by enabling "Define an additional "Paths are relative to" option" in global settings ? After doing that You can give the ${PARENT_WORKSPACE} as the path relative to which your file will be searched for.

          Can you give it a try, if didn't do it yet ?

          Vivek.

          Show
          svvivek Vivekanand SV added a comment - Hi Kevin, I have just taken the ownership of this plugin, so I have to go through the code. Would do that when I am a little free. For now, have you checked by enabling "Define an additional "Paths are relative to" option" in global settings ? After doing that You can give the ${PARENT_WORKSPACE} as the path relative to which your file will be searched for. Can you give it a try, if didn't do it yet ? Vivek.
          Hide
          chr0n1x Kevin R. added a comment -

          Just tried it, did not do anything.
          Let me know if I can provide more info! And thank you for taking ownership of this plugin

          Show
          chr0n1x Kevin R. added a comment - Just tried it, did not do anything. Let me know if I can provide more info! And thank you for taking ownership of this plugin
          Hide
          svvivek Vivekanand SV added a comment -

          I'm in the weekend mood now

          I'll check it and update you sometime during next week.

          Show
          svvivek Vivekanand SV added a comment - I'm in the weekend mood now I'll check it and update you sometime during next week.
          Hide
          svvivek Vivekanand SV added a comment -

          Kevin, you said "I have the workspace defined as ${PARENT_WORKSPACE}", can I know where you defined it ? Btw, as far as I have worked with the different plugins on slaves, the workspace part will always be created inside ....../axis-label/salve-node/...../workspace.

          This is not issue with this plugin, any plugin you use get the workspace path from jenkins inside axis-label/slave/..../workspace. As far as I know, thats how jenkins works. (Based on my practical experience with other plugins I use in a multi-configuration setup)

          If you think I missed something please correct me.

          Show
          svvivek Vivekanand SV added a comment - Kevin, you said "I have the workspace defined as ${PARENT_WORKSPACE}", can I know where you defined it ? Btw, as far as I have worked with the different plugins on slaves, the workspace part will always be created inside ....../axis-label/salve-node/...../workspace. This is not issue with this plugin, any plugin you use get the workspace path from jenkins inside axis-label/slave/..../workspace. As far as I know, thats how jenkins works. (Based on my practical experience with other plugins I use in a multi-configuration setup) If you think I missed something please correct me.
          Hide
          chr0n1x Kevin R. added a comment -

          ${PARENT_WORKSPACE} is in /etc/jenkins, a directory that I maintain with scripts. In the job itself, under "Advanced Project Options" -> "Directory for sub-builds" == /etc/jenkins

          I had to enable "Paths are relative to ..." in the global options as a workaround, so for now it works. However it seems that the options per project should override the global options, which it does not as far as I can tell.

          Show
          chr0n1x Kevin R. added a comment - ${PARENT_WORKSPACE} is in /etc/jenkins, a directory that I maintain with scripts. In the job itself, under "Advanced Project Options" -> "Directory for sub-builds" == /etc/jenkins I had to enable "Paths are relative to ..." in the global options as a workaround, so for now it works. However it seems that the options per project should override the global options, which it does not as far as I can tell.

            People

            • Assignee:
              svvivek Vivekanand SV
              Reporter:
              chr0n1x Kevin R.
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: