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 BuildListenerCommitFailedExceptionpublic void deleteIntegratedBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws BranchDeletionFailedException,
NothingToDoException,
UnsupportedConfigurationException
build - The Buildlauncher - The Launcherlistener - The BuildListenerBranchDeletionFailedExceptionNothingToDoExceptionUnsupportedConfigurationExceptionpublic 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 outEstablishingWorkspaceFailedExceptionpublic 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 BuildListenerNothingToDoExceptionUnsupportedConfigurationExceptionprotected void mergeChanges(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws NothingToDoException,
IntegrationFailedException,
UnsupportedConfigurationException
build - The Buildlauncher - The Launcherlistener - The BuildListenerNothingToDoExceptionIntegrationFailedExceptionUnsupportedConfigurationExceptionpublic void prepareWorkspace(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws EstablishingWorkspaceFailedException,
NothingToDoException,
IntegrationFailedException,
UnsupportedConfigurationException
build - The Buildlauncher - The Launcherlistener - The BuildListenerIntegrationFailedExceptionEstablishingWorkspaceFailedExceptionNothingToDoExceptionUnsupportedConfigurationExceptionpublic void updateBuildDescription(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws NothingToDoException,
UnsupportedConfigurationException
build - The Buildlauncher - The Launcherlistener - The BuildListenerNothingToDoExceptionUnsupportedConfigurationExceptionpublic void validateConfiguration(hudson.model.AbstractProject<?,?> project)
throws UnsupportedConfigurationException
project - The ProjectUnsupportedConfigurationExceptionpublic 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.