jenkinsci / jenkinsci/matrix-project-plugin

[JENKINS-27465] Please provide access to environment variables in combination filter

Open
#613 0 comments 0 reactions 0 assignees View on GitHub
component:matrix-project-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
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


  • assignee: kohsuke
  • status: Open
  • priority: Minor
  • component(s): matrix-project-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-06

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

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.