Class EphemeralCredentialsForgetGlobalVariable

java.lang.Object
org.jenkinsci.plugins.workflow.cps.GlobalVariable
io.jenkins.plugins.ephemeral_credentials.EphemeralCredentialsForgetGlobalVariable
All Implemented Interfaces:
ExtensionPoint

@Extension public class EphemeralCredentialsForgetGlobalVariable extends org.jenkinsci.plugins.workflow.cps.GlobalVariable
Registers ephemeralCredentialsForget(id) as a global step (no @Library import needed) - drops the credential cached under id for the current run, if any, and returns whether one was actually present. Useful for proactively purging a sensitive one-time-use credential before the run ends, rather than waiting for EphemeralCredentialsRunListener's whole-run cleanup. The pipeline-facing equivalent of EphemeralCredentialsAccessor.forget(java.lang.String).
See Also:
  • Constructor Details

    • EphemeralCredentialsForgetGlobalVariable

      public EphemeralCredentialsForgetGlobalVariable()
  • Method Details

    • getName

      @NonNull public String getName()
      Specified by:
      getName in class org.jenkinsci.plugins.workflow.cps.GlobalVariable
    • getValue

      @NonNull public Object getValue(@NonNull org.jenkinsci.plugins.workflow.cps.CpsScript script)
      Specified by:
      getValue in class org.jenkinsci.plugins.workflow.cps.GlobalVariable