Class EphemeralCredentialsAccessorGlobalVariable
java.lang.Object
org.jenkinsci.plugins.workflow.cps.GlobalVariable
io.jenkins.plugins.ephemeral_credentials.EphemeralCredentialsAccessorGlobalVariable
- All Implemented Interfaces:
ExtensionPoint
@Extension
public class EphemeralCredentialsAccessorGlobalVariable
extends org.jenkinsci.plugins.workflow.cps.GlobalVariable
Registers ephemeralCredentials as a global variable (no
@Library import needed), resolving to an EphemeralCredentialsAccessor bound to the current run - lets a pipeline
write ephemeralCredentials['FOO'] = someCredentials /
ephemeralCredentials['FOO'] /
ephemeralCredentials.containsKey('FOO') /
ephemeralCredentials.remove('FOO') directly.
Cached in the script's Binding after first resolution, the
same way WithEphemeralCredentialsGlobalVariable caches its own
instance - EphemeralCredentialsAccessor only holds a plain
runId String, so re-resolving it repeatedly would be harmless, but
there's no reason to redo the CpsRuns.current() lookup on every
single ephemeralCredentials[...] access within one script run.
- 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
-
EphemeralCredentialsAccessorGlobalVariable
public EphemeralCredentialsAccessorGlobalVariable()
-
-
Method Details
-
getName
- Specified by:
getNamein classorg.jenkinsci.plugins.workflow.cps.GlobalVariable
-
getValue
- Specified by:
getValuein classorg.jenkinsci.plugins.workflow.cps.GlobalVariable
-