Package jenkins.plugins.git
Interface GitCredentialBindings
-
- All Known Implementing Classes:
GitUsernamePasswordBinding
public interface GitCredentialBindings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default hudson.plugins.git.GitTool
getCliGitTool(Run<?,?> run, String gitToolName, TaskListener listener)
Ensures that the gitTool available is of type cli git/GitTool.classGitTool
.org.jenkinsci.plugins.gitclient.GitClient
getGitClientInstance(String gitExe, FilePath repository, EnvVars env, TaskListener listener)
Use GitClient to perform git operations in a repository.default boolean
isCurrentNodeOSUnix(Launcher launcher)
Checks the OS environment of the node/controllervoid
setCredentialPairBindings(com.cloudbees.plugins.credentials.common.StandardCredentials credentials, Map<String,String> secretValues, Map<String,String> publicValues)
Sets secret or public pair value(s)void
setGitEnvironmentVariables(org.jenkinsci.plugins.gitclient.GitClient git, Map<String,String> secretValues, Map<String,String> publicValues)
Set Git specific environment variable
-
-
-
Method Detail
-
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,String> publicValues) throws IOException, InterruptedException
Set Git specific environment variable- Parameters:
git
- GitClientGitClient
. Cannot be null.secretValues
- The valuesMap
to be hidden in build logspublicValues
- The valuesMap
to be visible in build logs- Throws:
IOException
InterruptedException
-
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 pathString
to git executableGit.using(String)
repository
- The pathString
to working directoryGit.in(File)
env
- The environment valuesEnvVars
listener
- The task listener.- Returns:
- a GitClient implementation
GitClient
- Throws:
IOException
InterruptedException
-
isCurrentNodeOSUnix
default boolean isCurrentNodeOSUnix(@NonNull Launcher launcher)
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, InterruptedException
Ensures that the gitTool available is of type cli git/GitTool.classGitTool
.- Parameters:
run
- The buildRun
. Cannot be nullgitToolName
- The name of the git toolString
listener
- The task listener. Cannot be null.- Returns:
- A git tool of type GitTool.class
GitTool
or null - Throws:
IOException
InterruptedException
-
-