Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27465

Please provide access to environment variables in combination filter

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • matrix-project-plugin
    • None

      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.

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

          There are no comments yet on this issue.

            kohsuke Kohsuke Kawaguchi
            bulb Jan Hudec
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: