org.jenkinsci.plugins.pretestedintegration
Class AbstractSCMBridge
java.lang.Object
org.jenkinsci.plugins.pretestedintegration.AbstractSCMBridge
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<AbstractSCMBridge>
- Direct Known Subclasses:
- GitBridge
public abstract class AbstractSCMBridge
- extends Object
- implements hudson.model.Describable<AbstractSCMBridge>, hudson.ExtensionPoint
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
Method Summary |
static hudson.DescriptorExtensionList<AbstractSCMBridge,SCMBridgeDescriptor<AbstractSCMBridge>> |
all()
|
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. |
abstract void |
ensureBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
String branch)
|
static List<IntegrationStrategyDescriptor<?>> |
getBehaviours()
|
String |
getBranch()
|
hudson.model.Descriptor<AbstractSCMBridge> |
getDescriptor()
|
static List<SCMBridgeDescriptor<?>> |
getDescriptors()
|
hudson.model.Result |
getRequiredResult()
|
void |
handlePostBuild(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
This is called after the build has run. |
protected void |
mergeChanges(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
Commit<?> commit)
Default is to use the selected integration strategy |
Commit<?> |
nextCommit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
Commit<?> commit)
Calculate and return the next commit from the argument |
void |
prepareWorkspace(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
Commit<?> commit)
This function is called after the SCM plugin has updated the workspace
with remote changes. |
void |
rollback(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener 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 |
branch
protected String branch
integrationStrategy
public final IntegrationStrategy integrationStrategy
AbstractSCMBridge
@DataBoundConstructor
public AbstractSCMBridge(IntegrationStrategy integrationStrategy)
getBranch
public String getBranch()
getDescriptor
public hudson.model.Descriptor<AbstractSCMBridge> getDescriptor()
- Specified by:
getDescriptor
in interface hudson.model.Describable<AbstractSCMBridge>
all
public static hudson.DescriptorExtensionList<AbstractSCMBridge,SCMBridgeDescriptor<AbstractSCMBridge>> all()
getDescriptors
public static List<SCMBridgeDescriptor<?>> getDescriptors()
getBehaviours
public static List<IntegrationStrategyDescriptor<?>> getBehaviours()
prepareWorkspace
public void prepareWorkspace(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
Commit<?> commit)
throws EstablishWorkspaceException,
NothingToDoException,
IntegationFailedExeception
- This function is called after the SCM plugin has updated the workspace
with remote changes. When this function has been run, the workspace must
be ready to perform a build and tests. The integration branch must be
checked out, and the given commit must be merged into it.
- Parameters:
build
- launcher
- listener
- commit
- This commit represents the code that must be checked out.
- Throws:
IntegationFailedExeception
EstablishWorkspaceException
NothingToDoException
mergeChanges
protected void mergeChanges(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
Commit<?> commit)
throws NothingToDoException,
IntegationFailedExeception
- Default is to use the selected integration strategy
- Parameters:
build
- launcher
- listener
- commit
-
- Throws:
NothingToDoException
IntegationFailedExeception
ensureBranch
public abstract void ensureBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
String branch)
throws EstablishWorkspaceException
- Throws:
EstablishWorkspaceException
determineIntegrationHead
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. This is used to roll back in case of integraion failure
- Parameters:
build
- launcher
- listener
-
- Returns:
nextCommit
public Commit<?> nextCommit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
Commit<?> commit)
throws NextCommitFailureException
- Calculate and return the next commit from the argument
- Parameters:
build
- launcher
- listener
- commit
-
- Returns:
- The next pending commit. If no commit is pending null is
returned.
- Throws:
NextCommitFailureException
commit
public void commit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws CommitChangesFailureException
- Throws:
CommitChangesFailureException
rollback
public void rollback(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws RollbackFailureException
- Throws:
RollbackFailureException
deleteIntegratedBranch
public void deleteIntegratedBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws DeleteIntegratedBranchException
- Throws:
DeleteIntegratedBranchException
updateBuildDescription
public void updateBuildDescription(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
getRequiredResult
public hudson.model.Result getRequiredResult()
handlePostBuild
public void handlePostBuild(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws IOException
- This is called after the build has run. If the build was successful, the
changes should be committed, otherwise the workspace is cleared as before
the changes
- Parameters:
build
- The status of the build.launcher
- listener
-
- Throws:
IOException
- A repository could not be reached.
Copyright © 2004-2014. All Rights Reserved.