@ExportedBean(defaultVisibility=999) public class BuildData extends Object implements hudson.model.Action, Serializable, Cloneable
This object is added to Actionable.getActions().
This persists the Git related information of that build.
| Modifier and Type | Field and Description |
|---|---|
Map<String,Build> |
buildsByBranchName
Map of branch
name -> build (Branch name to last built SHA1). |
Build |
lastBuild
The last build that we did (among the values in
buildsByBranchName.) |
Set<String> |
remoteUrls
The URLs that have been referenced.
|
String |
scmName
The name of the SCM as given by the user.
|
| Constructor and Description |
|---|
BuildData() |
BuildData(String scmName) |
BuildData(String scmName,
Collection<UserRemoteConfig> remoteConfigs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRemoteUrl(String remoteUrl) |
BuildData |
clone() |
boolean |
equals(Object o) |
hudson.model.Api |
getApi() |
Map<String,Build> |
getBuildsByBranchName() |
String |
getDisplayName()
Returns the build data display name, optionally with SCM name.
|
String |
getIconFileName() |
Integer |
getIndex()
Gets the identifier used to disambiguate multiple
BuildData actions attached to a Run. |
Build |
getLastBuild(org.eclipse.jgit.lib.ObjectId sha1) |
Build |
getLastBuildOfBranch(String branch) |
hudson.plugins.git.Revision |
getLastBuiltRevision()
Gets revision of the previous build.
|
hudson.model.Run<?,?> |
getOwningRun() |
Set<String> |
getRemoteUrls() |
String |
getScmName() |
String |
getUrlName() |
boolean |
hasBeenBuilt(org.eclipse.jgit.lib.ObjectId sha1)
Return true if the history shows this SHA1 has been built.
|
boolean |
hasBeenReferenced(String remoteUrl) |
int |
hashCode() |
Object |
readResolve() |
void |
saveBuild(Build build) |
void |
setIndex(Integer index)
Sets an identifier used to disambiguate multiple
BuildData actions attached to a Run |
void |
setScmName(String scmName) |
boolean |
similarTo(BuildData that)
Like
equals(Object) but doesn't check the URL as strictly, since those can vary
while still representing the same remote repository. |
String |
toString() |
public Map<String,Build> buildsByBranchName
name -> build (Branch name to last built SHA1).
This map contains all the branches we've built in the past (including the build that this BuildData
is attached to)
public Build lastBuild
buildsByBranchName.)public String scmName
public BuildData()
public BuildData(String scmName)
public BuildData(String scmName, Collection<UserRemoteConfig> remoteConfigs)
public String getDisplayName()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObjectpublic String getIconFileName()
getIconFileName in interface hudson.model.Actionpublic String getUrlName()
getUrlName in interface hudson.model.Actionpublic void setIndex(Integer index)
BuildData actions attached to a Runindex - the index, indexes less than or equal to 1 will be discarded.@CheckForNull public Integer getIndex()
BuildData actions attached to a Run.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull public hudson.model.Run<?,?> getOwningRun()
public Object readResolve()
public boolean hasBeenBuilt(org.eclipse.jgit.lib.ObjectId sha1)
sha1 - SHA1 hash of commitpublic Build getLastBuild(org.eclipse.jgit.lib.ObjectId sha1)
public void saveBuild(Build build)
@Exported @CheckForNull public hudson.plugins.git.Revision getLastBuiltRevision()
public void setScmName(String scmName)
@Exported public String getScmName()
public void addRemoteUrl(String remoteUrl)
public boolean hasBeenReferenced(String remoteUrl)
public hudson.model.Api getApi()
public boolean similarTo(BuildData that)
equals(Object) but doesn't check the URL as strictly, since those can vary
while still representing the same remote repository.Copyright © 2007–2018. All rights reserved.