Class DockerSecretSource
- java.lang.Object
-
- io.jenkins.plugins.casc.SecretSource
-
- io.jenkins.plugins.casc.impl.secrets.DockerSecretSource
-
- All Implemented Interfaces:
ExtensionPoint
@Extension public class DockerSecretSource extends SecretSource
SecretSource
implementation relying on docker secrets. The path to secret directory can be overridden by setting environment variableSECRETS
.- Author:
- Nicolas De Loof
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static String
DOCKER_SECRETS
-
Constructor Summary
Constructors Constructor Description DockerSecretSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
reveal(String secret)
Reveal the plaintext value of a secret.-
Methods inherited from class io.jenkins.plugins.casc.SecretSource
all, init
-
-
-
-
Field Detail
-
DOCKER_SECRETS
public static final String DOCKER_SECRETS
- See Also:
- Constant Field Values
-
-
Method Detail
-
reveal
public Optional<String> reveal(String secret) throws IOException
Description copied from class:SecretSource
Reveal the plaintext value of a secret.- Specified by:
reveal
in classSecretSource
- Parameters:
secret
- the variable reference to reveal- Returns:
- the secret's value, or Optional.empty() if a recoverable error occurred. (An empty Optional will allow CasC to continue processing the resolver chain.)
Recoverable errors include:
- the secret was not found in the backing store
- Throws:
IOException
- if an unrecoverable error occurred. (The exception will stop CasC processing the resolver chain.)Unrecoverable errors include:
- all attempts to contact the backing store have failed (including any applicable retry strategies)
- authentication or authorization with the backing store failed
- the secret's value was not convertible to a String
-
-