@ExportedBean(defaultVisibility=999) public class Build extends Object implements Serializable, Cloneable
Revision.BuildData.buildsByBranchName,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
int |
hudsonBuildNumber |
hudson.model.Result |
hudsonBuildResult |
hudson.plugins.git.Revision |
marked
Revision in the repository marked as built.
|
hudson.plugins.git.Revision |
revision
Revision that was actually built.
|
| Constructor and Description |
|---|
Build(hudson.plugins.git.Revision revision,
int buildNumber,
hudson.model.Result result) |
Build(hudson.plugins.git.Revision marked,
hudson.plugins.git.Revision revision,
int buildNumber,
hudson.model.Result result) |
| Modifier and Type | Method and Description |
|---|---|
Build |
clone() |
int |
getBuildNumber() |
hudson.model.Result |
getBuildResult() |
hudson.plugins.git.Revision |
getMarked() |
hudson.plugins.git.Revision |
getRevision() |
org.eclipse.jgit.lib.ObjectId |
getSHA1() |
boolean |
isFor(String sha1) |
Object |
readResolve() |
String |
toString() |
public hudson.plugins.git.Revision marked
This field is used to avoid doing the same build twice, by (normally) recording the commit in the upstream repository that initiated the build.
For simple use cases, this value is normally the same as revision. Where this gets different is when
a revision to checkout is decorated and differs from the commit found in the repository (for example, a merge
before a build.) In such a situation, we need to remember the commit that came from the upstream so that
future polling and build will not attempt to do another build from the same upstream commit.
In some other kind of speculative merging, such as github pull request build, this field should point
to the same value as revision, as we want to be able to build two pull requests rooted at the same
commit in the base repository.
public hudson.plugins.git.Revision revision
This points to the commit that was checked out to the workspace when GitSCM.checkout(hudson.model.Run<?, ?>, hudson.Launcher, hudson.FilePath, hudson.model.TaskListener, java.io.File, hudson.scm.SCMRevisionState) left.
public int hudsonBuildNumber
public hudson.model.Result hudsonBuildResult
public Build(hudson.plugins.git.Revision marked,
hudson.plugins.git.Revision revision,
int buildNumber,
hudson.model.Result result)
public Build(hudson.plugins.git.Revision revision,
int buildNumber,
hudson.model.Result result)
public org.eclipse.jgit.lib.ObjectId getSHA1()
@Exported public hudson.plugins.git.Revision getRevision()
@Exported public hudson.plugins.git.Revision getMarked()
@Exported public int getBuildNumber()
@Exported public hudson.model.Result getBuildResult()
public boolean isFor(String sha1)
public Object readResolve() throws IOException
IOExceptionCopyright © 2004-2015. All Rights Reserved.