public abstract class AbstractSCMBridge extends Object implements hudson.model.Describable<AbstractSCMBridge>, hudson.ExtensionPoint
Modifier and Type | Field and Description |
---|---|
protected String |
branch
The integration branch.
|
IntegrationStrategy |
integrationStrategy
The integration strategy.
|
Constructor and Description |
---|
AbstractSCMBridge(IntegrationStrategy integrationStrategy)
Constructor for the SCM bridge.
|
Modifier and Type | Method and Description |
---|---|
static hudson.DescriptorExtensionList<AbstractSCMBridge,SCMBridgeDescriptor<AbstractSCMBridge>> |
all() |
void |
commit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Pushes changes to the integration branch.
|
void |
deleteIntegratedBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Deletes the integrated branch.
|
abstract void |
ensureBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
String branch)
Make sure the SCM is checked out on the given branch.
|
static List<IntegrationStrategyDescriptor<?>> |
getBehaviours() |
String |
getBranch() |
hudson.model.Descriptor<AbstractSCMBridge> |
getDescriptor() |
static List<SCMBridgeDescriptor<?>> |
getDescriptors() |
String |
getExpandedBranch(hudson.EnvVars environment) |
hudson.model.Result |
getRequiredResult() |
abstract void |
handlePostBuild(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Called after the build has run.
|
void |
isApplicable(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
Determines if we should prepare a workspace for integration.
|
protected void |
mergeChanges(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Integrates the commit into the integration branch.
|
void |
prepareWorkspace(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Called after the SCM plugin has updated the workspace with remote changes.
|
void |
updateBuildDescription(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Updates the description of the Jenkins build.
|
void |
validateConfiguration(hudson.model.AbstractProject<?,?> project)
Validates the configuration of the Jenkins Job.
|
protected String branch
public final IntegrationStrategy integrationStrategy
public AbstractSCMBridge(IntegrationStrategy integrationStrategy)
integrationStrategy
- The integration strategy to apply when merging commits.public void commit(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws CommitFailedException
build
- The Buildlauncher
- The Launcherlistener
- The BuildListenerCommitFailedException
public void deleteIntegratedBranch(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws BranchDeletionFailedException, NothingToDoException, UnsupportedConfigurationException
build
- The Buildlauncher
- The Launcherlistener
- The BuildListenerBranchDeletionFailedException
NothingToDoException
UnsupportedConfigurationException
public abstract void ensureBranch(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener, String branch) throws EstablishingWorkspaceFailedException
build
- The Buildlauncher
- The Launcherlistener
- The BuildListenerbranch
- The branch to check outEstablishingWorkspaceFailedException
public abstract void handlePostBuild(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws IOException
build
- The Buildlauncher
- The Launcherlistener
- The BuildListenerIOException
- A repository could not be reached.public void isApplicable(hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener) throws NothingToDoException, UnsupportedConfigurationException
build
- The Buildlistener
- The BuildListenerNothingToDoException
UnsupportedConfigurationException
protected void mergeChanges(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws NothingToDoException, IntegrationFailedException, UnsupportedConfigurationException
build
- The Buildlauncher
- The Launcherlistener
- The BuildListenerNothingToDoException
IntegrationFailedException
UnsupportedConfigurationException
public void prepareWorkspace(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws EstablishingWorkspaceFailedException, NothingToDoException, IntegrationFailedException, UnsupportedConfigurationException
build
- The Buildlauncher
- The Launcherlistener
- The BuildListenerIntegrationFailedException
EstablishingWorkspaceFailedException
NothingToDoException
UnsupportedConfigurationException
public void updateBuildDescription(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws NothingToDoException, UnsupportedConfigurationException
build
- The Buildlauncher
- The Launcherlistener
- The BuildListenerNothingToDoException
UnsupportedConfigurationException
public void validateConfiguration(hudson.model.AbstractProject<?,?> project) throws UnsupportedConfigurationException
project
- The ProjectUnsupportedConfigurationException
public static hudson.DescriptorExtensionList<AbstractSCMBridge,SCMBridgeDescriptor<AbstractSCMBridge>> all()
public static List<IntegrationStrategyDescriptor<?>> getBehaviours()
public hudson.model.Descriptor<AbstractSCMBridge> getDescriptor()
getDescriptor
in interface hudson.model.Describable<AbstractSCMBridge>
public static List<SCMBridgeDescriptor<?>> getDescriptors()
public String getBranch()
public String getExpandedBranch(hudson.EnvVars environment)
environment
- The environment to expand the branch inpublic hudson.model.Result getRequiredResult()
Copyright © 2004–2016. All rights reserved.