public class GitBridge extends AbstractSCMBridge
Modifier and Type | Class and Description |
---|---|
static class |
GitBridge.DescriptorImpl |
branch, integrationStrategy
Constructor and Description |
---|
GitBridge(IntegrationStrategy integrationStrategy,
String branch) |
GitBridge(IntegrationStrategy integrationStrategy,
String branch,
String repoName) |
Modifier and Type | Method and Description |
---|---|
hudson.plugins.git.util.BuildData |
checkAndDetermineRelevantBuildData(List<hudson.plugins.git.util.BuildData> data)
Checks a list of git build data for current build and extracts
the relevant build data related to the Integration repository configuration.
|
void |
commit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener) |
void |
deleteIntegratedBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener) |
protected Commit<?> |
determineIntegrationHead(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
Override this to associate an integrated commit with a pointer with the starting point before merge.
|
void |
ensureBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
String branch) |
String |
getBranch() |
String |
getRepoName() |
String |
getRevId() |
hudson.FilePath |
getWorkingDirectory() |
int |
git(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
OutputStream out,
String... cmds)
Invoke a command with mercurial
|
int |
git(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
String... cmds)
Invoke a command with git
|
void |
handlePostBuild(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
This is called after the build has run.
|
void |
isApplicable(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
Method that determines if we should prepare workspace for integration.
|
hudson.FilePath |
resolveWorkspace(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener) |
void |
setRepoName(String repoName) |
void |
setWorkingDirectory(hudson.FilePath workingDirectory) |
protected void |
update(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener) |
void |
updateBuildDescription(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener) |
void |
validateConfiguration(hudson.model.AbstractProject<?,?> project) |
all, getBehaviours, getDescriptor, getDescriptors, getRequiredResult, mergeChanges, nextCommit, prepareWorkspace
@DataBoundConstructor public GitBridge(IntegrationStrategy integrationStrategy, String branch, String repoName)
public GitBridge(IntegrationStrategy integrationStrategy, String branch)
public String getBranch()
getBranch
in class AbstractSCMBridge
public String getRevId()
public void setWorkingDirectory(hudson.FilePath workingDirectory)
public hudson.FilePath getWorkingDirectory()
public int git(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener listener, String... cmds) throws IOException, InterruptedException
build
- launcher
- listener
- cmds
- IOException
InterruptedException
public int git(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener listener, OutputStream out, String... cmds) throws IOException, InterruptedException
build
- launcher
- listener
- cmds
- out
- IOException
InterruptedException
public void ensureBranch(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener, String branch) throws EstablishWorkspaceException
ensureBranch
in class AbstractSCMBridge
EstablishWorkspaceException
protected void update(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener listener) throws IOException, InterruptedException
IOException
InterruptedException
public void commit(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws CommitChangesFailureException
commit
in class AbstractSCMBridge
CommitChangesFailureException
public hudson.plugins.git.util.BuildData checkAndDetermineRelevantBuildData(List<hudson.plugins.git.util.BuildData> data) throws NothingToDoException, UnsupportedConfigurationException
data
- - git build dataNothingToDoException
- if none of the git build data matches chosen integration repositoryUnsupportedConfigurationException
- if there is ambiguity about which git build data set to chose to integratepublic void isApplicable(hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener) throws NothingToDoException, UnsupportedConfigurationException
AbstractSCMBridge
isApplicable
in class AbstractSCMBridge
NothingToDoException
UnsupportedConfigurationException
public void deleteIntegratedBranch(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws DeleteIntegratedBranchException, NothingToDoException, UnsupportedConfigurationException
deleteIntegratedBranch
in class AbstractSCMBridge
DeleteIntegratedBranchException
NothingToDoException
UnsupportedConfigurationException
public void updateBuildDescription(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws NothingToDoException, UnsupportedConfigurationException
updateBuildDescription
in class AbstractSCMBridge
NothingToDoException
UnsupportedConfigurationException
public hudson.FilePath resolveWorkspace(hudson.model.AbstractBuild<?,?> build, hudson.model.TaskListener listener) throws InterruptedException, IOException
InterruptedException
IOException
protected Commit<?> determineIntegrationHead(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener listener)
AbstractSCMBridge
determineIntegrationHead
in class AbstractSCMBridge
public String getRepoName()
public void setRepoName(String repoName)
repoName
- the remoteName to setpublic void validateConfiguration(hudson.model.AbstractProject<?,?> project) throws UnsupportedConfigurationException
validateConfiguration
in class AbstractSCMBridge
UnsupportedConfigurationException
public void handlePostBuild(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws IOException
AbstractSCMBridge
handlePostBuild
in class AbstractSCMBridge
build
- The status of the build.IOException
- A repository could not be reached.Copyright © 2004–2015. All rights reserved.