public class GitBridge extends AbstractSCMBridge
Modifier and Type | Class and Description |
---|---|
static class |
GitBridge.DescriptorImpl
Descriptor implementation for GitBridge
|
integrationStrategy, LOG_PREFIX
Constructor and Description |
---|
GitBridge(IntegrationStrategy integrationStrategy,
String integrationBranch,
String repoName)
Constructor for GitBridge.
|
Modifier and Type | Method and Description |
---|---|
static void |
deleteBranch(hudson.model.Run<?,?> run,
hudson.model.TaskListener listener,
org.jenkinsci.plugins.gitclient.GitClient client,
String branchToBeDeleted,
String expandedRepo) |
void |
evalBranchConfigurations(hudson.plugins.git.Branch triggeredBranch,
String integrationBranch,
String repoName) |
String |
getExpandedIntegrationBranch(hudson.EnvVars environment) |
String |
getExpandedRepository(hudson.EnvVars environment) |
String |
getIntegrationBranch()
Information about the result of the integration (Unknown, Conflict, Build, Push).
|
String |
getRepoName() |
hudson.FilePath |
getWorkingDirectory() |
void |
handleIntegrationExceptionsGit(hudson.model.Run<?,?> run,
hudson.model.TaskListener listener,
Exception e,
org.jenkinsci.plugins.gitclient.GitClient client) |
static void |
pushToBranch(hudson.model.TaskListener listener,
org.jenkinsci.plugins.gitclient.GitClient client,
String branchToPush,
String expandedRepo) |
static void |
pushToBranch(hudson.model.TaskListener listener,
org.jenkinsci.plugins.gitclient.GitClient client,
String targetRemoteBranch,
String expandedRepo,
int retries) |
static void |
pushToBranch(hudson.model.TaskListener listener,
org.jenkinsci.plugins.gitclient.GitClient client,
String sourceLocalBranch,
String targetRemoteBranch,
String expandedRepo) |
static void |
pushToIntegrationBranchGit(hudson.model.Run<?,?> run,
hudson.model.TaskListener listener,
org.jenkinsci.plugins.gitclient.GitClient client,
String expandedRepo,
String expandedBranch) |
void |
setRepoName(String repositoryName) |
void |
setWorkingDirectory(hudson.FilePath workingDirectory) |
static void |
updateBuildDescription(hudson.model.Run<?,?> run,
hudson.model.TaskListener listener,
String integrationBranch,
String triggeredBranch) |
all, getBehaviours, getDescriptor, getDescriptors, getRequiredResult, validateConfiguration
@DataBoundConstructor public GitBridge(IntegrationStrategy integrationStrategy, String integrationBranch, String repoName)
integrationStrategy
- The selected IntegrationStrategyintegrationBranch
- The Integration Branch namerepoName
- The Integration Repository namepublic static void pushToIntegrationBranchGit(hudson.model.Run<?,?> run, hudson.model.TaskListener listener, org.jenkinsci.plugins.gitclient.GitClient client, String expandedRepo, String expandedBranch) throws PushFailedException
PushFailedException
public static void pushToBranch(hudson.model.TaskListener listener, org.jenkinsci.plugins.gitclient.GitClient client, String branchToPush, String expandedRepo) throws PushFailedException
PushFailedException
public static void pushToBranch(hudson.model.TaskListener listener, org.jenkinsci.plugins.gitclient.GitClient client, String sourceLocalBranch, String targetRemoteBranch, String expandedRepo) throws PushFailedException
PushFailedException
public static void pushToBranch(hudson.model.TaskListener listener, org.jenkinsci.plugins.gitclient.GitClient client, String targetRemoteBranch, String expandedRepo, int retries) throws PushFailedException
PushFailedException
public static void deleteBranch(hudson.model.Run<?,?> run, hudson.model.TaskListener listener, org.jenkinsci.plugins.gitclient.GitClient client, String branchToBeDeleted, String expandedRepo) throws BranchDeletionFailedException, IOException
public static void updateBuildDescription(hudson.model.Run<?,?> run, hudson.model.TaskListener listener, String integrationBranch, String triggeredBranch)
public String getIntegrationBranch()
getIntegrationBranch
in class AbstractSCMBridge
public String getExpandedIntegrationBranch(hudson.EnvVars environment)
getExpandedIntegrationBranch
in class AbstractSCMBridge
environment
- environmentpublic hudson.FilePath getWorkingDirectory()
public void setWorkingDirectory(hudson.FilePath workingDirectory)
workingDirectory
- the workingDirectory to setpublic String getRepoName()
@DataBoundSetter public void setRepoName(String repositoryName)
repositoryName
- the repositoryName to setpublic String getExpandedRepository(hudson.EnvVars environment)
environment
- the environement to look for stringspublic void evalBranchConfigurations(hudson.plugins.git.Branch triggeredBranch, String integrationBranch, String repoName) throws hudson.AbortException
triggeredBranch
- The triggered branchintegrationBranch
- The integration branchrepoName
- The repo name like 'origin'hudson.AbortException
- The triggered branch and the integration is the same - not allowedpublic void handleIntegrationExceptionsGit(hudson.model.Run<?,?> run, hudson.model.TaskListener listener, Exception e, org.jenkinsci.plugins.gitclient.GitClient client) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2016–2022. All rights reserved.