public class GitBridge extends AbstractSCMBridge
| Modifier and Type | Class and Description |
|---|---|
static class |
GitBridge.DescriptorImpl
Descriptor implementation for GitBridge
|
branch, integrationStrategy| Constructor and Description |
|---|
GitBridge(IntegrationStrategy integrationStrategy,
String branch,
String repositoryName)
Constructor for GitBridge.
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Pushes changes to the integration branch.
|
int |
countCommits(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
Counts the commits in the relevant BuildData
|
void |
deleteIntegratedBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Deletes the integrated branch.
|
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.
|
hudson.plugins.git.util.BuildData |
findRelevantBuildData(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
Retrieves the BuildData for the given build relevant to the Integration Repository.
|
protected hudson.plugins.git.GitSCM |
findScm(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
Returns the Git SCM for the relevant build data.
|
String |
getBranch() |
String |
getExpandedBranch(hudson.EnvVars environment) |
String |
getRepoName() |
hudson.FilePath |
getWorkingDirectory() |
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.
|
hudson.FilePath |
resolveWorkspace(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
Returns the workspace
|
void |
setRepoName(String repositoryName) |
void |
setWorkingDirectory(hudson.FilePath workingDirectory) |
protected void |
update(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
Pulls in the remote branch
|
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.
|
all, getBehaviours, getDescriptor, getDescriptors, getRequiredResult, mergeChanges, prepareWorkspace@DataBoundConstructor public GitBridge(IntegrationStrategy integrationStrategy, String branch, String repositoryName)
integrationStrategy - The selected IntegrationStrategybranch - The Integration Branch namerepositoryName - The Integration Repository nameprotected hudson.plugins.git.GitSCM findScm(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
throws InterruptedException,
NothingToDoException,
UnsupportedConfigurationException
build - The Buildlistener - The BuildListenerInterruptedException - When no matching SCMs are foundNothingToDoException - When no relevant BuildData is found.UnsupportedConfigurationException - When multiple, ambiguous relevant BuildDatas are found.public void ensureBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener,
String branch)
throws EstablishingWorkspaceFailedException
ensureBranch in class AbstractSCMBridgebuild - The Buildlauncher - The Launcherlistener - The BuildListenerbranch - The branch to check outEstablishingWorkspaceFailedExceptionprotected void update(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws IOException,
InterruptedException
build - The Buildlauncher - The Launcherlistener - The ListenerIOExceptionInterruptedExceptionpublic void commit(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws CommitFailedException
commit in class AbstractSCMBridgebuild - The Buildlauncher - The Launcherlistener - The BuildListenerCommitFailedExceptionpublic hudson.plugins.git.util.BuildData findRelevantBuildData(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
throws NothingToDoException,
UnsupportedConfigurationException
build - The Buildlistener - The TaskListenerNothingToDoException - If no relevant BuildData was found.UnsupportedConfigurationException - If multiple, ambiguous BuildDatas were found.public void isApplicable(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
throws NothingToDoException,
UnsupportedConfigurationException
isApplicable in class AbstractSCMBridgebuild - The Buildlistener - The BuildListenerNothingToDoExceptionUnsupportedConfigurationExceptionpublic void deleteIntegratedBranch(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws BranchDeletionFailedException,
NothingToDoException,
UnsupportedConfigurationException
deleteIntegratedBranch in class AbstractSCMBridgebuild - The Buildlauncher - The Launcherlistener - The BuildListenerBranchDeletionFailedExceptionNothingToDoExceptionUnsupportedConfigurationExceptionpublic void updateBuildDescription(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws NothingToDoException,
UnsupportedConfigurationException
updateBuildDescription in class AbstractSCMBridgebuild - The Buildlauncher - The Launcherlistener - The BuildListenerNothingToDoExceptionUnsupportedConfigurationExceptionpublic hudson.FilePath resolveWorkspace(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
throws InterruptedException,
IOException
build - The Buildlistener - The ListenerInterruptedExceptionIOExceptionpublic void validateConfiguration(hudson.model.AbstractProject<?,?> project)
throws UnsupportedConfigurationException
validateConfiguration in class AbstractSCMBridgeproject - The ProjectUnsupportedConfigurationExceptionpublic int countCommits(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
throws IOException,
InterruptedException
build - The Buildlistener - The ListenerIOExceptionInterruptedExceptionpublic void handlePostBuild(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws IOException
handlePostBuild in class AbstractSCMBridgebuild - The Buildlauncher - The Launcherlistener - The BuildListenerIOException - A repository could not be reached.public String getBranch()
getBranch in class AbstractSCMBridgepublic String getExpandedBranch(hudson.EnvVars environment)
getExpandedBranch in class AbstractSCMBridgeenvironment - The environment to expand the branch inpublic void setWorkingDirectory(hudson.FilePath workingDirectory)
workingDirectory - the workingDirectory to setpublic hudson.FilePath getWorkingDirectory()
public String getRepoName()
public void setRepoName(String repositoryName)
repositoryName - the repositoryName to setCopyright © 2004–2016. All rights reserved.