@NameWith(value=GoogleContainerRegistryCredential.NameProvider.class, priority=99) public class GoogleContainerRegistryCredential extends com.cloudbees.plugins.credentials.impl.BaseStandardCredentials implements com.cloudbees.plugins.credentials.domains.DomainRestrictedCredentials, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
GoogleRobotCredentials
as a username and password for use with a
org.jenkinsci.plugins.dockerbuildstep.cmd.DockerCommand
.
BACKGROUND: Google Container Registry accepts a
username/password combination that is truly "_token:StandardUsernamePasswordCredentials
for usage with the
new Credentials
-aware
org.jenkinsci.plugins.dockerbuildstep.cmd.DockerCommand
plugins.
Modifier and Type | Class and Description |
---|---|
static class |
GoogleContainerRegistryCredential.DescriptorImpl
Descriptor class for its global configuration.
|
static class |
GoogleContainerRegistryCredential.EnclosingDomainRequirementProvider
We do not have a descriptor, so that we won't show up in the user interface
as a credential that can be explicitly created, so we will not be
discovered by the DescribableDomainRequirementProvider.
|
static class |
GoogleContainerRegistryCredential.NameProvider
Provide a name that the user will understand, in the dropdown
shown by
org.jenkinsci.plugins.dockerbuildstep.cmd.DockerCommand . |
Constructor and Description |
---|
GoogleContainerRegistryCredential(String credentialsId,
GoogleContainerRegistryCredentialModule module) |
Modifier and Type | Method and Description |
---|---|
com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials |
getCredentials()
Retrieve our wrapped credentials based on the above ID we store.
|
String |
getCredentialsId()
Return the unique ID of the inner
GoogleRobotCredentials that this
Username/Password proxy is wrapping. |
String |
getDescription() |
GoogleContainerRegistryCredential.DescriptorImpl |
getDescriptor() |
String |
getGcrServer() |
hudson.util.Secret |
getPassword() |
String |
getUsername() |
boolean |
matches(List<com.cloudbees.plugins.credentials.domains.DomainRequirement> requirements)
This type of credentials only works for authenticating against registry's
server.
|
equals, getId, hashCode
@DataBoundConstructor public GoogleContainerRegistryCredential(String credentialsId, @Nullable GoogleContainerRegistryCredentialModule module)
public String getCredentialsId()
GoogleRobotCredentials
that this
Username/Password proxy is wrapping.@Nullable public com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials getCredentials()
public boolean matches(List<com.cloudbees.plugins.credentials.domains.DomainRequirement> requirements)
matches
in interface com.cloudbees.plugins.credentials.domains.DomainRestrictedCredentials
public String getDescription()
getDescription
in interface com.cloudbees.plugins.credentials.common.StandardCredentials
getDescription
in class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
public GoogleContainerRegistryCredential.DescriptorImpl getDescriptor()
getDescriptor
in interface com.cloudbees.plugins.credentials.Credentials
getDescriptor
in interface hudson.model.Describable<com.cloudbees.plugins.credentials.Credentials>
getDescriptor
in class com.cloudbees.plugins.credentials.BaseCredentials
public String getUsername()
getUsername
in interface com.cloudbees.plugins.credentials.common.UsernameCredentials
public hudson.util.Secret getPassword()
getPassword
in interface com.cloudbees.plugins.credentials.common.PasswordCredentials
public String getGcrServer()
Copyright © 2004-2015. All Rights Reserved.