Class GlobalVariableSet
java.lang.Object
org.jenkinsci.plugins.workflow.cps.GlobalVariableSet
- All Implemented Interfaces:
ExtensionPoint
,Iterable<GlobalVariable>
- Direct Known Subclasses:
GlobalVariableSet.GlobalVariableProvider
public abstract class GlobalVariableSet
extends Object
implements ExtensionPoint, Iterable<GlobalVariable>
Extension point that defines a collection of global variables.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AllowGlobalVariable
s to be defined withExtension
, and make them discoverable viaGlobalVariableSet
.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionEnumerate all global variables from this provider which should be associated with a given job.Enumerate all global variables from this provider which should be associated with a given build.iterator()
Deprecated.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
-
Constructor Details
-
GlobalVariableSet
public GlobalVariableSet()
-
-
Method Details
-
forRun
Enumerate all global variables from this provider which should be associated with a given build.- 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
-
forJob
Enumerate all global variables from this provider which should be associated with a given job.- Parameters:
job
- a job; or may be left null to look for variables that exist without any context- Returns:
- a possibly empty set; by default delegates to
forRun(hudson.model.Run<?, ?>)
onJob.getLastSuccessfulBuild()
-
iterator
Deprecated.implementforRun(hudson.model.Run<?, ?>)
instead- Specified by:
iterator
in interfaceIterable<GlobalVariable>
-
forRun(hudson.model.Run<?, ?>)
instead