Class SCMVar
java.lang.Object
org.jenkinsci.plugins.workflow.cps.GlobalVariable
org.jenkinsci.plugins.workflow.multibranch.SCMVar
- All Implemented Interfaces:
ExtensionPoint
Adds an
scm global variable to the script.
This makes it possible to run checkout scm to get your project sources in the right branch.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEnsures thatscmis saved in its XML representation.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class org.jenkinsci.plugins.workflow.cps.GlobalVariable
ALL -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.jenkinsci.plugins.workflow.cps.GlobalVariable
byName, forJob, forRun
-
Constructor Details
-
SCMVar
public SCMVar()
-
-
Method Details
-
getName
- Specified by:
getNamein classorg.jenkinsci.plugins.workflow.cps.GlobalVariable
-
getValue
@NonNull public SCM getValue(@NonNull org.jenkinsci.plugins.workflow.cps.CpsScript script) throws Exception - Specified by:
getValuein classorg.jenkinsci.plugins.workflow.cps.GlobalVariable- Throws:
Exception
-