public class FeatureBranchProperty
extends hudson.model.JobProperty<hudson.model.AbstractProject<?,?>>
JobProperty
for feature branch projects.
This associates the upstream project (with IntegratableProject
with this project.
Modifier and Type | Class and Description |
---|---|
static class |
FeatureBranchProperty.DescriptorImpl |
static class |
FeatureBranchProperty.IntegrationResult
Represents the result of integration.
|
static class |
FeatureBranchProperty.ItemListenerImpl
If an upstream is renamed, update the configuration accordingly.
|
Constructor and Description |
---|
FeatureBranchProperty(String upstream) |
Modifier and Type | Method and Description |
---|---|
List<hudson.model.Action> |
getJobActions(hudson.model.AbstractProject<?,?> project) |
hudson.model.AbstractProject<?,?> |
getOwner() |
String |
getUpstream() |
hudson.model.AbstractProject<?,?> |
getUpstreamProject()
Gets the upstream project, or null if no such project was found.
|
hudson.scm.SubversionSCM.ModuleLocation |
getUpstreamSubversionLocation() |
org.tmatesoft.svn.core.SVNURL |
getUpstreamURL()
Gets the
getUpstreamSubversionLocation() as SVNURL |
FeatureBranchProperty.IntegrationResult |
integrate(hudson.model.TaskListener listener,
String branchURL,
long branchRev,
String commitMessage)
Perform a merge to the upstream that integrates changes in this branch.
|
boolean |
prebuild(hudson.model.AbstractBuild<?,?> build,
hudson.model.BuildListener listener)
Just add the integration action.
|
long |
rebase(hudson.model.TaskListener listener,
long upstreamRev)
Integrates changes made in the upstream into the branch at the workspace.
|
@DataBoundConstructor public FeatureBranchProperty(String upstream)
public String getUpstream()
public hudson.model.AbstractProject<?,?> getUpstreamProject()
public hudson.scm.SubversionSCM.ModuleLocation getUpstreamSubversionLocation()
public org.tmatesoft.svn.core.SVNURL getUpstreamURL() throws org.tmatesoft.svn.core.SVNException
getUpstreamSubversionLocation()
as SVNURL
org.tmatesoft.svn.core.SVNException
public hudson.model.AbstractProject<?,?> getOwner()
public List<hudson.model.Action> getJobActions(hudson.model.AbstractProject<?,?> project)
getJobActions
in class hudson.model.JobProperty<hudson.model.AbstractProject<?,?>>
public boolean prebuild(hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
prebuild
in interface hudson.tasks.BuildStep
prebuild
in class hudson.model.JobProperty<hudson.model.AbstractProject<?,?>>
public long rebase(hudson.model.TaskListener listener, long upstreamRev) throws IOException, InterruptedException
This computation uses the workspace of the project. First, we update the workspace to the tip of the branch (or else the commit will fail later), merge the changes from the upstream, then commit it. If the merge fails, we'll revert the workspace so that the next build can go smoothly.
listener
- Where the progress is sent.upstreamRev
- Revision of the upstream to rebase from.
If -1, use the latest.IOException
InterruptedException
public FeatureBranchProperty.IntegrationResult integrate(hudson.model.TaskListener listener, String branchURL, long branchRev, String commitMessage) throws IOException, InterruptedException
This computation uses the workspace of the project.
listener
- Where the progress is sent.branchURL
- URL of the branch to be integrated. If null, use the workspace URL.branchRev
- Revision of the branch to be integrated to the upstream.
If -1, use the current workspace revision.FeatureBranchProperty.IntegrationResult
IOException
InterruptedException
Copyright © 2004-2014. All Rights Reserved.