jenkinsci / jenkinsci/matrix-project-plugin
[JENKINS-9531] choose matrix build nodes based on label matches
- Dominant language
- Java
- Stars
- 17
- Forks
- 85
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 5
Description
With matrix (multiconfiguration) build jobs one can select (groups of) slaves to build the job on with the axes. It would be nice if when an axis matches multiple nodes (i.e. a label that applies to more than one node, such as x86_64) the node list could be further filtered by (not) matching more labels.
For example, say I have a list of nodes with the following labels:
builder1: el5 x86_64
builder2: el5 i686
builder3: el5 x86_64 lab
builder4: el5 i686 lab
If one of my axis specifications is "el5" then any one of the above nodes would be selected as a slave to build on. However, what would be nice is to have a further filter on the selected nodes, like "lab", so that even though the axis specification of "el5" would match any of the available 4 nodes, that additional "lab" filter would mean that only builder3 and builder4 are eligible nodes.
---
Originally reported by brian, imported from: choose matrix build nodes based on label matches
Raw content of original issue
With matrix (multiconfiguration) build jobs one can select (groups of) slaves to build the job on with the axes. It would be nice if when an axis matches multiple nodes (i.e. a label that applies to more than one node, such as x86_64) the node list could be further filtered by (not) matching more labels.
For example, say I have a list of nodes with the following labels:
builder1: el5 x86_64
builder2: el5 i686
builder3: el5 x86_64 lab
builder4: el5 i686 labIf one of my axis specifications is "el5" then any one of the above nodes would be selected as a slave to build on. However, what would be nice is to have a further filter on the selected nodes, like "lab", so that even though the axis specification of "el5" would match any of the available 4 nodes, that additional "lab" filter would mean that only builder3 and builder4 are eligible nodes.
Contributor guide
Research direction
No files or tests are named. Start by locating the matrix-project-plugin entry points that select build nodes from axis labels, then trace how additional label filters could restrict the candidates. Done means an axis such as "el5" can be further filtered by a label such as "lab", including the example where only builder3 and builder4 remain eligible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100