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

          cedricroijakkers Cedric Roijakkers created issue -
          cedricroijakkers Cedric Roijakkers made changes -
          Field Original Value New Value
          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.

          I have now restricted the job to the master node, but this is of course not ideal.
          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.
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 164255 ] JNJira + In-Review [ 181567 ]
          fillenseer Frank Illenseer made changes -
          Priority Minor [ 4 ] Blocker [ 1 ]
          cashlalala KaiHsiang Chang made changes -
          Assignee Maurice W. [ morficus ] KaiHsiang Chang [ cashlalala ]
          cashlalala KaiHsiang Chang made changes -
          cashlalala KaiHsiang Chang made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            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: