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

Load parameters from external file doesn't work on 'dumb' Jenkins slave

    Details

    • Similar Issues:

      Description

      When Jenkins is running in master/slave mode, and a job which uses the Parameterized Remote Trigger Plugin is running on the dumb slave, using the option 'Load parameters from external file' doesn't work.

      We have a job set up which executes all kinds of things, and then writes a file in $WORKSPACE/versiontodeploy.txt with the following contents:

      DEPLOY_VERSION=5.15.30027

      (Obviously, the version number changes on every build)

      Since the job can run on two different nodes, the location of the file can be different. On the master node, the $WORKSPACE has location:

      /data/jenkins/jobs/name-of-the-job-in-jenkins/workspace

      And on the slave, the location is:

      /data/jenkins-slave/workspace/name-of-the-job-in-jenkins

      The file is configured as '/versiontodeploy.txt' in the plugin settings, and since this is relative to the $WORKSPACE, it works fine on the master node. In theory, it should also work on the slave node, but it does not. The parameter cannot be found.

      This then causes the job on the remote Jenkins instance which needs to be triggered to fail, since this instance requires a parameter named DEPLOY_VERSION, and this is empty (because it cannot be found in the versiontodeploy.txt file).

      I have now restricted the job to the master node, but this is of course not ideal.

        Attachments

          Activity

          Hide
          intelradoux intelradoux added a comment - - edited

          Hello,

          I push a PR to fix this: https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/24

          Issue is the plugin want to read standard local file but we need to read "jenkins" way (ask jenkins to read file for us so that master can ask slave if needed).

          Show
          intelradoux intelradoux added a comment - - edited Hello, I push a PR to fix this: https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/24 Issue is the plugin want to read standard local file but we need to read "jenkins" way (ask jenkins to read file for us so that master can ask slave if needed).
          Hide
          fillenseer Frank Illenseer added a comment - - edited

          I am also experiencing this with the Parameterized Remote Trigger Plugin v2.2.2 on Jenkins ver. 1.656 still.
          This is a kind of showstopper for us here, as I need to get parameters from a previous build step (I write them to a properties file in the workspace on the build slave) and then need them in a second build step which triggers on another remote Jenkins some further stuff.

          Is there any timeframe as to when the pull request will be merged and the fixed Parameterized Remote Trigger Plugin will be available?

          PS: I also noted that there will always be a forward slash inserted into the edit field for external properties file upon save (so I enter for example "src/myFile.properties" and then save and re-open the config again, then it reads "/src/myFile.properties").

          Show
          fillenseer Frank Illenseer added a comment - - edited I am also experiencing this with the Parameterized Remote Trigger Plugin v2.2.2 on Jenkins ver. 1.656 still. This is a kind of showstopper for us here, as I need to get parameters from a previous build step (I write them to a properties file in the workspace on the build slave) and then need them in a second build step which triggers on another remote Jenkins some further stuff. Is there any timeframe as to when the pull request will be merged and the fixed Parameterized Remote Trigger Plugin will be available? PS: I also noted that there will always be a forward slash inserted into the edit field for external properties file upon save (so I enter for example "src/myFile.properties" and then save and re-open the config again, then it reads "/src/myFile.properties").
          Hide
          cashlalala KaiHsiang Chang added a comment -

          fixed in v3.0.0

          Show
          cashlalala KaiHsiang Chang added a comment - fixed in v3.0.0

            People

            • Assignee:
              cashlalala KaiHsiang Chang
              Reporter:
              cedricroijakkers Cedric Roijakkers
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: