@OptionalExtension(requirePlugins="docker-commons") public class DockerServerCredentialsConvertor extends SecretToCredentialConverter
ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
DockerServerCredentialsConvertor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(String type)
Check if this converter can transform secrets of a given type.
|
org.jenkinsci.plugins.docker.commons.credentials.DockerServerCredentials |
convert(io.fabric8.kubernetes.api.model.Secret secret)
Convert the given
Secret to an IdCredential. |
allpublic boolean canConvert(String type)
SecretToCredentialConvertercanConvert in class SecretToCredentialConvertertype - the type of secret. This is normally the symbol attached to the credential type by the credential binding plugin.true iff this SecretToCredentialConvertor can convert secrets of the specified type.public org.jenkinsci.plugins.docker.commons.credentials.DockerServerCredentials convert(io.fabric8.kubernetes.api.model.Secret secret)
throws CredentialsConvertionException
SecretToCredentialConverterSecret to an IdCredential.
This will only be called for a secret of a type that the class has previously returned true from SecretToCredentialConverter.canConvert(String).convert in class SecretToCredentialConvertersecret - the Secret to convert.CredentialsConvertionException - if the Secret could not be converted.Copyright © 2018–2023. All rights reserved.