jenkinsci / jenkinsci/matrix-project-plugin
[JENKINS-21602] Option to exclude off-line Slaves in "Individual Slaves"
- Dominant language
- Java
- Stars
- 17
- Forks
- 85
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 5
Description
I would like to use a Matrix Job to release software to Jenkins Master and Slaves. Unfortunately, if any slave is off-line the job never finishes which means it will not run again (at the next release) without manual intervention. I would either like an "on-line slaves only" option, or for something like this to work as a combination filter:
Hudson.instance.getComputer(label == "master"?"":label).getNode().getChannel() != null
The above scriptlet works fine in scriptler, but I cannot seem to get it running (with or without an import) in the combination filter. The combination box will not properly process "import" and without the import "Hudson" is undefined.
---
Originally reported by fmerrow, imported from: Option to exclude off-line Slaves in "Individual Slaves"
Raw content of original issue
I would like to use a Matrix Job to release software to Jenkins Master and Slaves. Unfortunately, if any slave is off-line the job never finishes which means it will not run again (at the next release) without manual intervention. I would either like an "on-line slaves only" option, or for something like this to work as a combination filter:
Hudson.instance.getComputer(label == "master"?"":label).getNode().getChannel() != null
The above scriptlet works fine in scriptler, but I cannot seem to get it running (with or without an import) in the combination filter. The combination box will not properly process "import" and without the import "Hudson" is undefined.
- environment:
All
1 attachment
- [MatrixSlaveOnlineConfig.png](https://issues.jenkins.io/secure/attachment/25231/MatrixSlaveOnlineConfig.png)
> 
Contributor guide
Research direction
Start by locating the matrix-project-plugin code for the “Individual Slaves” configuration and combination filter, then review how offline slaves and filter scripts are evaluated. Done means an explicit online-slaves-only behavior or a working equivalent filter that prevents offline slave combinations from blocking the matrix job.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100