Class WithEphemeralCredentialsGlobalVariable
- All Implemented Interfaces:
ExtensionPoint
Registers withEphemeralCredentials as a global pipeline step,
available in any Pipeline job once this plugin is installed - no
@Library import needed, same as lock or input.
The actual implementation (WithEphemeralCredentials.groovy)
ships as a plugin resource, not precompiled, and is parsed on demand
through the calling script's own GroovyClassLoader - the same
technique docker-workflow-plugin's DockerDSL uses for its
Docker.groovy - so it gets the same CPS transformation as a
shared-library vars/src script, which is what makes its calls to
lock/input safe. The source is read via this class's own
classloader (which can always find our plugin's resources) and handed
directly to parseClass, rather than relying on the CPS
classloader's loadClass to independently discover a .groovy
resource across plugin boundaries - that discovery path isn't guaranteed
to search other plugins' jars.
See also the WithEphemeralCredentials step (provided
in WithEphemeralCredentials.groovy source file).
- See Also:
-
Nested Class Summary
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
-
WithEphemeralCredentialsGlobalVariable
public WithEphemeralCredentialsGlobalVariable()
-
-
Method Details
-
getName
- Specified by:
getNamein classorg.jenkinsci.plugins.workflow.cps.GlobalVariable
-
getValue
@NonNull public Object getValue(@NonNull org.jenkinsci.plugins.workflow.cps.CpsScript script) throws Exception - Specified by:
getValuein classorg.jenkinsci.plugins.workflow.cps.GlobalVariable- Throws:
Exception
-