Class GlobalVariableSet.GlobalVariableProvider

java.lang.Object
org.jenkinsci.plugins.workflow.cps.GlobalVariableSet
org.jenkinsci.plugins.workflow.cps.GlobalVariableSet.GlobalVariableProvider
All Implemented Interfaces:
ExtensionPoint, Iterable<GlobalVariable>
Enclosing class:
GlobalVariableSet

@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static class GlobalVariableSet.GlobalVariableProvider extends GlobalVariableSet
Allow GlobalVariables to be defined with Extension, and make them discoverable via GlobalVariableSet. This simplifies the registration of single global variable.
  • Constructor Details

    • GlobalVariableProvider

      public GlobalVariableProvider()
  • Method Details

    • forRun

      public Collection<GlobalVariable> forRun(Run<?,?> run)
      Description copied from class: GlobalVariableSet
      Enumerate all global variables from this provider which should be associated with a given build.
      Overrides:
      forRun in class GlobalVariableSet
      Parameters:
      run - a build, which may or may not still be running; or may be left null to look for variables that exist without any context
      Returns:
      a possibly empty set