Package io.jenkins.plugins.ephemeral_credentials
package io.jenkins.plugins.ephemeral_credentials
-
ClassesClassDescriptionCertificate (PKCS#12 keystore + password).Registers
ephemeralCertificate(id: ..., description: ...).A convenient, pipeline-facing handle ontoEphemeralCredentialsProvider's store, permanently scoped to a single build - every operation is constrained to whichever run this accessor was created for, the same waywithEphemeralCredentialsitself only ever touches its own run's cache.RegistersephemeralCredentialsas a global variable (no@Libraryimport needed), resolving to anEphemeralCredentialsAccessorbound to the current run - lets a pipeline writeephemeralCredentials['FOO'] = someCredentials/ephemeralCredentials['FOO']/ephemeralCredentials.containsKey('FOO')/ephemeralCredentials.remove('FOO')directly.RegistersephemeralCredentialsFind(id)as a global step (no@Libraryimport needed) - returns theCredentialscached underidfor the current run, ornullif nothing is cached under that ID.RegistersephemeralCredentialsForget(id)as a global step (no@Libraryimport needed) - drops the credential cached underidfor the current run, if any, and returns whether one was actually present.RegistersephemeralCredentialsHas(id)as a global step (no@Libraryimport needed) - returns whether a credential is cached underidfor the current run.Describes one credential awithEphemeralCredentialsblock may need to resolve interactively: whichinputparameters to ask the user for, and how to turn the collected answers into a concreteCredentialsobject.ACredentialsProviderthat only ever answers with ephemeral credentials that some currently executing Pipeline build itself put into it.RegistersephemeralCredentialsPut(...)as a global step (no@Libraryimport needed), caching a credential intoEphemeralCredentialsProviderfor the current run directly - the pipeline-facing equivalent ofEphemeralCredentialsAccessor.put(java.lang.String, com.cloudbees.plugins.credentials.Credentials).Authoritative cleanup backstop forEphemeralCredentialsProvider:onFinalizedfires for every way a build can end -- success, failure, or a hard kill/abort -- independently of whether the Pipeline script itself got to run its ownfinallyblock.onDeletedcovers a build record being removed later. Either way, nothing this plugin has cached for that build should outlive it.Secret file.RegistersephemeralSecretFile(id: ..., description: ..., fileName: ...)-fileNameis optional and defaults toid.Represents ephemeral secret text credential.RegistersephemeralSecretText(id: ..., description: ...)as a global factory function - seeEphemeralUsernamePasswordGlobalVariablefor the general shape and why a precompiled Closure is fine here.SSH Username with private key.RegistersephemeralSSHUserPrivateKey(id: ..., description: ...)- seeEphemeralUsernamePasswordGlobalVariablefor the general shape.Two strings: a username and a password.RegistersephemeralUsernamePassword(id: ..., description: ...)as a global factory function, usable inside awithEphemeralCredentialsspec list - the same DSL ergonomics asusernamePassword(...)insidewithCredentials, just producing anEphemeralUsernamePasswordinstead of binding env vars directly.RegisterswithEphemeralCredentialsas a global pipeline step, available in any Pipeline job once this plugin is installed - no@Libraryimport needed, same aslockorinput.