Class EphemeralUsernamePasswordGlobalVariable

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

@Extension public class EphemeralUsernamePasswordGlobalVariable extends org.jenkinsci.plugins.workflow.cps.GlobalVariable

Registers ephemeralUsernamePassword(id: ..., description: ...) as a global factory function, usable inside a withEphemeralCredentials spec list - the same DSL ergonomics as usernamePassword(...) inside withCredentials, just producing an EphemeralUsernamePassword instead of binding env vars directly.

Unlike WithEphemeralCredentials, this never invokes a pipeline step itself - it just builds a plain data object - so a precompiled Java Closure is fine; no CPS transformation is needed here.

See Also:
  • Constructor Details

    • EphemeralUsernamePasswordGlobalVariable

      public EphemeralUsernamePasswordGlobalVariable()
  • 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