jenkinsci / jenkinsci/matrix-project-plugin
[JENKINS-27465] Please provide access to environment variables in combination filter
- Dominant language
- Java
- Stars
- 17
- Forks
- 85
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 5
Description
Occasionally when building for particular platform is unavailable I need to exclude it from all jobs while I still want them to run on other platforms and be considered done even though they didn't run on the excluded one.
For this I set a global variable in System Configuration with list of disabled platforms. However, the combination filter then looks like
!(Thread.currentThread() instanceof hudson.model.OneOffExecutor ? Thread.currentThread().currentExecutable.getEnvironment(null)["DISABLED_PLATFORMS"].tokenize(",") : []).contains(LABEL)
It would be nice if there was easier way to refer to some kind of global setting. Especially since this now requires approving the involved methods and the approvals only come up when build is attempted, because in the evaluation during saving the current thread is not OneOffExecutor and the methods are not called.
---
Originally reported by bulb, imported from: Please provide access to environment variables in combination filter
kohsuke
Raw content of original issue
Occasionally when building for particular platform is unavailable I need to exclude it from all jobs while I still want them to run on other platforms and be considered done even though they didn't run on the excluded one.
For this I set a global variable in System Configuration with list of disabled platforms. However, the combination filter then looks like
!(Thread.currentThread() instanceof hudson.model.OneOffExecutor ? Thread.currentThread().currentExecutable.getEnvironment(null)["DISABLED_PLATFORMS"].tokenize(",") : []).contains(LABEL)It would be nice if there was easier way to refer to some kind of global setting. Especially since this now requires approving the involved methods and the approvals only come up when build is attempted, because in the evaluation during saving the current thread is not OneOffExecutor and the methods are not called.
Contributor guide
Assessment
This issue has not been assessed yet.