Package jenkins.plugins.git
Interface GitCredentialBindings
- All Known Implementing Classes:
GitUsernamePasswordBinding
public interface GitCredentialBindings
-
Method Summary
Modifier and TypeMethodDescriptiondefault hudson.plugins.git.GitToolgetCliGitTool(Run<?, ?> run, String gitToolName, TaskListener listener) Ensures that the gitTool available is of type cli git/GitTool.classGitTool.org.jenkinsci.plugins.gitclient.GitClientgetGitClientInstance(String gitExe, FilePath repository, EnvVars env, TaskListener listener) Use GitClient to perform git operations in a repository.default booleanisCurrentNodeOSUnix(Launcher launcher) Checks the OS environment of the node/controllervoidsetCredentialPairBindings(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 variable
-
Method Details
-
setCredentialPairBindings
void setCredentialPairBindings(@NonNull com.cloudbees.plugins.credentials.common.StandardCredentials credentials, Map<String, String> secretValues, Map<String, String> publicValues) Sets secret or public pair value(s) -
setGitEnvironmentVariables
void setGitEnvironmentVariables(@NonNull org.jenkinsci.plugins.gitclient.GitClient git, Map<String, String> secretValues, Map<String, throws IOException, InterruptedExceptionString> publicValues) Set Git specific environment variable- Parameters:
git- GitClientGitClient. Cannot be null.secretValues- The valuesMapto be hidden in build logspublicValues- The valuesMapto be visible in build logs- Throws:
IOExceptionInterruptedException
-
getGitClientInstance
org.jenkinsci.plugins.gitclient.GitClient getGitClientInstance(String gitExe, FilePath repository, EnvVars env, TaskListener listener) throws IOException, InterruptedException Use GitClient to perform git operations in a repository. Using Git implementations JGit/JGit Apache/Cli Git- Parameters:
gitExe- 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
-
isCurrentNodeOSUnix
Checks the OS environment of the node/controller- Parameters:
launcher- The launcher.Cannot be null- Returns:
- false if current node/controller is not running in windows environment
-
getCliGitTool
default hudson.plugins.git.GitTool getCliGitTool(Run<?, ?> run, String gitToolName, TaskListener listener) throws IOException, InterruptedExceptionEnsures that the gitTool available is of type cli git/GitTool.classGitTool.- Parameters:
run- The buildRun. Cannot be nullgitToolName- The name of the git toolStringlistener- The task listener. Cannot be null.- Returns:
- A git tool of type GitTool.class
GitToolor null - Throws:
IOExceptionInterruptedException
-