jenkinsci / jenkinsci/nodelabelparameter-plugin

[JENKINS-13006] Allows node labels to be read from a file.

Open
#482 3 comments 0 reactions 0 assignees View on GitHub
component:nodelabelparameter-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
28
Forks
59
Avg merge
1h 24m
Merged PRs (30d)
3

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.

---
Originally reported by richardtaylor, imported from: Allows node labels to be read from a file.


  • status: Open
  • priority: Major
  • component(s): nodelabelparameter-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 4
  • imported: 20251210-235911

Raw content of original issue

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.


  • environment: Windows Server 2008 SP2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.