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

Allows node labels to be read from a file.

    XMLWordPrintable

Details

    Description

      Allow node labels to be read from a file and selected from a list as a job parameter. (Ref: functionality from Extended Choice Parameter plugin)

      Motivation.
      We have a set of jobs which can be run an any development or release branch. The branch is a parameter of the job.
      We have a set of large branches which can take several hours to checkout from fresh.

      Jenkins has support for tying Jobs to nodes but with very large branches this is a poor fit. The checkout and sync of a branch is the most significant factor in build time so the key to keeping builds fast is to reuse the same branch on the same slave for different job. i.e. The branch is tied to the slave and NOT the job.

      We already have a script which will write out available branches to a text file that is used by the Extended Choice Parameter plugin. The plan was then to use this branch choise parameter as a node lablel, dynamically selecting the correct set of slaves given the selected branch for the job. Unfortunately the 'Restrict where this project can be run' label does not support variable expansion.

      ATM we have a hybrid solution where build which need to be fast are duplicated and hardcoded for each branch on a different set of slaves. Build which needs to be unique (such as package builds which need a sequential build number for versioning) have to checkout the branch on the slave and incure the sync overhead which can be several hours.

      Any help greatly appreciated.

      Attachments

        Activity

          have you looked at the feature this plugin adds to the "ParameterizedTrigger plugin"?
          would that be of any help for you? The ParameterizedTrigger plugin allows you to read parameters from a file.
          https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin#NodeLabelParameterPlugin-ParameterizedTriggerplugin

          domi Dominik Bartholdi added a comment - have you looked at the feature this plugin adds to the "ParameterizedTrigger plugin"? would that be of any help for you? The ParameterizedTrigger plugin allows you to read parameters from a file. https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin#NodeLabelParameterPlugin-ParameterizedTriggerplugin

          any feedback on this?

          domi Dominik Bartholdi added a comment - any feedback on this?
          sergey_irisov Sergey Irisov added a comment -

          I'm using Parametrized Trigger Plugin and trying to use File Parameter Factory with node variable inside. With Parametrized Build Plugin I configured job with some label parameter. And when job is triggered with params from file, existing nodelabel parameter (with same name as in file) is overwrited but as a string parameter, and job eventually runs on master.

          sergey_irisov Sergey Irisov added a comment - I'm using Parametrized Trigger Plugin and trying to use File Parameter Factory with node variable inside. With Parametrized Build Plugin I configured job with some label parameter. And when job is triggered with params from file, existing nodelabel parameter (with same name as in file) is overwrited but as a string parameter, and job eventually runs on master.

          People

            Unassigned Unassigned
            richardtaylor Richard Taylor
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: