Class DockerServerCredentialsConvertor
java.lang.Object
com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.convertors.DockerServerCredentialsConvertor
- All Implemented Interfaces:
ExtensionPoint
@OptionalExtension(requirePlugins="docker-commons")
public class DockerServerCredentialsConvertor
extends SecretToCredentialConverter
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvert(String type) Check if this converter can transform secrets of a given type.org.jenkinsci.plugins.docker.commons.credentials.DockerServerCredentialsconvert(io.fabric8.kubernetes.api.model.Secret secret) Convert the givenSecretto anIdCredential.Methods inherited from class com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
all
-
Constructor Details
-
DockerServerCredentialsConvertor
public DockerServerCredentialsConvertor()
-
-
Method Details
-
canConvert
Description copied from class:SecretToCredentialConverterCheck if this converter can transform secrets of a given type.- Specified by:
canConvertin classSecretToCredentialConverter- Parameters:
type- the type of secret. This is normally the symbol attached to the credential type by the credential binding plugin.- Returns:
trueiff thisSecretToCredentialConvertorcan convert secrets of the specified type.
-
convert
public org.jenkinsci.plugins.docker.commons.credentials.DockerServerCredentials convert(io.fabric8.kubernetes.api.model.Secret secret) throws CredentialsConvertionException Description copied from class:SecretToCredentialConverterConvert the givenSecretto anIdCredential. This will only be called for a secret of a type that the class has previously returnedtruefromSecretToCredentialConverter.canConvert(String).- Specified by:
convertin classSecretToCredentialConverter- Parameters:
secret- the Secret to convert.- Returns:
- the IdCredentials created from the secret.
- Throws:
CredentialsConvertionException- if the Secret could not be converted.
-