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
AllowGlobalVariable
s to be defined withExtension
, and make them discoverable viaGlobalVariableSet
. This simplifies the registration of single global variable.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.workflow.cps.GlobalVariableSet
GlobalVariableSet.GlobalVariableProvider
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description GlobalVariableProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<GlobalVariable>
forRun(Run<?,?> run)
Enumerate all global variables from this provider which should be associated with a given build.-
Methods inherited from class org.jenkinsci.plugins.workflow.cps.GlobalVariableSet
forJob, iterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
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 classGlobalVariableSet
- 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
-
-