org.jenkinsci.plugins.pretestedintegration.scm.git
Class GitBridge
java.lang.Object
org.jenkinsci.plugins.pretestedintegration.AbstractSCMBridge
org.jenkinsci.plugins.pretestedintegration.scm.git.GitBridge
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<AbstractSCMBridge>
public class GitBridge
- extends AbstractSCMBridge
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
Method Summary |
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 |
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 |
Commit<String> |
nextCommit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
Commit<?> commit)
1. |
void |
rollback(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
|
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GitBridge
@DataBoundConstructor
public GitBridge(IntegrationStrategy integrationStrategy,
String branch)
getBranch
public String getBranch()
- Overrides:
getBranch
in class AbstractSCMBridge
getRevId
public String getRevId()
setWorkingDirectory
public void setWorkingDirectory(hudson.FilePath workingDirectory)
getWorkingDirectory
public hudson.FilePath getWorkingDirectory()
git
public int git(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
String... cmds)
throws IOException,
InterruptedException
- Invoke a command with git
- Parameters:
build
- launcher
- listener
- cmds
-
- Returns:
- The exitcode of command
- Throws:
IOException
InterruptedException
git
public int git(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
OutputStream out,
String... cmds)
throws IOException,
InterruptedException
- Invoke a command with mercurial
- Parameters:
build
- launcher
- listener
- cmds
-
- Returns:
- The exitcode of command
- Throws:
IOException
InterruptedException
ensureBranch
public void ensureBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
String branch)
throws EstablishWorkspaceException
- Specified by:
ensureBranch
in class AbstractSCMBridge
- Throws:
EstablishWorkspaceException
update
protected void update(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
throws IOException,
InterruptedException
- Throws:
IOException
InterruptedException
nextCommit
public Commit<String> nextCommit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
Commit<?> commit)
throws NextCommitFailureException
- 1. Convert the stuff in the commit to Map
2. Check the current working branch if there are any more commits in that
branch 3. Check the next branch round-robin
- Overrides:
nextCommit
in class AbstractSCMBridge
- Returns:
-
- Throws:
NextCommitFailureException
commit
public void commit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws CommitChangesFailureException
- Overrides:
commit
in class AbstractSCMBridge
- Throws:
CommitChangesFailureException
rollback
public void rollback(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws RollbackFailureException
- Overrides:
rollback
in class AbstractSCMBridge
- Throws:
RollbackFailureException
deleteIntegratedBranch
public void deleteIntegratedBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws DeleteIntegratedBranchException
- Overrides:
deleteIntegratedBranch
in class AbstractSCMBridge
- Throws:
DeleteIntegratedBranchException
updateBuildDescription
public void updateBuildDescription(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
- Overrides:
updateBuildDescription
in class AbstractSCMBridge
determineIntegrationHead
protected Commit<?> determineIntegrationHead(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
- Description copied from class:
AbstractSCMBridge
- Override this to associate an integrated commit with a pointer with the starting point before merge. This is used to roll back in case of integraion failure
- Overrides:
determineIntegrationHead
in class AbstractSCMBridge
- Returns:
Copyright © 2004-2014. All Rights Reserved.