Package jenkins.plugins.git
Class GitUsernamePasswordBinding
java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.credentialsbinding.MultiBinding<C>>
org.jenkinsci.plugins.credentialsbinding.MultiBinding<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>
jenkins.plugins.git.GitUsernamePasswordBinding
- All Implemented Interfaces:
ExtensionPoint,Describable<org.jenkinsci.plugins.credentialsbinding.MultiBinding<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>>,GitCredentialBindings
public class GitUsernamePasswordBinding
extends org.jenkinsci.plugins.credentialsbinding.MultiBinding<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>
implements GitCredentialBindings
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classprotected static final classNested classes/interfaces inherited from class org.jenkinsci.plugins.credentialsbinding.MultiBinding
org.jenkinsci.plugins.credentialsbinding.MultiBinding.MultiEnvironment, org.jenkinsci.plugins.credentialsbinding.MultiBinding.NullUnbinder, org.jenkinsci.plugins.credentialsbinding.MultiBinding.UnbinderNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jenkinsci.plugins.credentialsbinding.MultiBinding.MultiEnvironmentbind(Run<?, ?> run, FilePath filePath, Launcher launcher, TaskListener taskListener) org.jenkinsci.plugins.gitclient.GitClientgetGitClientInstance(String gitToolExe, FilePath repository, EnvVars env, TaskListener listener) Use GitClient to perform git operations in a repository.voidsetCredentialPairBindings(com.cloudbees.plugins.credentials.common.StandardCredentials credentials, Map<String, String> secretValues, Map<String, String> publicValues) Sets secret or public pair value(s)voidsetGitEnvironmentVariables(org.jenkinsci.plugins.gitclient.GitClient git, Map<String, String> secretValues, Map<String, String> publicValues) Set Git specific environment variableprotected Class<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>type()Methods inherited from class org.jenkinsci.plugins.credentialsbinding.MultiBinding
getCredentials, getCredentialsId, getDescriptor, variablesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jenkins.plugins.git.GitCredentialBindings
getCliGitTool, isCurrentNodeOSUnix
-
Constructor Details
-
GitUsernamePasswordBinding
-
-
Method Details
-
getGitToolName
-
type
protected Class<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials> type()- Specified by:
typein classorg.jenkinsci.plugins.credentialsbinding.MultiBinding<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>
-
bind
public org.jenkinsci.plugins.credentialsbinding.MultiBinding.MultiEnvironment bind(@NonNull Run<?, ?> run, FilePath filePath, Launcher launcher, @NonNull TaskListener taskListener) throws IOException, InterruptedException- Specified by:
bindin classorg.jenkinsci.plugins.credentialsbinding.MultiBinding<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>- Throws:
IOExceptionInterruptedException
-
variables
- Overrides:
variablesin classorg.jenkinsci.plugins.credentialsbinding.MultiBinding<com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>
-
setCredentialPairBindings
public void setCredentialPairBindings(@NonNull com.cloudbees.plugins.credentials.common.StandardCredentials credentials, Map<String, String> secretValues, Map<String, String> publicValues) Description copied from interface:GitCredentialBindingsSets secret or public pair value(s)- Specified by:
setCredentialPairBindingsin interfaceGitCredentialBindings- Parameters:
credentials- The credentialsStandardCredentials. Cannot be nullsecretValues- The valuesMapto be hidden in build logspublicValues- The valuesMapto be visible in build logs
-
setGitEnvironmentVariables
public void setGitEnvironmentVariables(@NonNull org.jenkinsci.plugins.gitclient.GitClient git, Map<String, String> secretValues, Map<String, throws IOException, InterruptedExceptionString> publicValues) Description copied from interface:GitCredentialBindingsSet Git specific environment variable- Specified by:
setGitEnvironmentVariablesin interfaceGitCredentialBindings- Parameters:
git- GitClientGitClient. Cannot be null.secretValues- The valuesMapto be hidden in build logspublicValues- The valuesMapto be visible in build logs- Throws:
IOExceptionInterruptedException
-
getGitClientInstance
public org.jenkinsci.plugins.gitclient.GitClient getGitClientInstance(String gitToolExe, FilePath repository, EnvVars env, TaskListener listener) throws IOException, InterruptedException Description copied from interface:GitCredentialBindingsUse GitClient to perform git operations in a repository. Using Git implementations JGit/JGit Apache/Cli Git- Specified by:
getGitClientInstancein interfaceGitCredentialBindings- Parameters:
gitToolExe- The pathStringto git executableGit.using(String)repository- The pathStringto working directoryGit.in(File)env- The environment valuesEnvVarslistener- The task listener.- Returns:
- a GitClient implementation
GitClient - Throws:
IOExceptionInterruptedException
-