@ExportedBean(defaultVisibility=999) public class BuildData extends Object implements 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) |
Api |
getApi() |
Map<String,Build> |
getBuildsByBranchName() |
String |
getDisplayName()
Returns the build data display name, optionally with SCM name.
|
String |
getIconFileName() |
Integer |
getIndex()
|
Build |
getLastBuild(org.eclipse.jgit.lib.ObjectId sha1) |
Build |
getLastBuildOfBranch(String branch) |
hudson.plugins.git.Revision |
getLastBuiltRevision()
Gets revision of the previous build.
|
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)
|
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 ActiongetDisplayName in interface ModelObjectpublic String getIconFileName()
getIconFileName in interface Actionpublic String getUrlName()
getUrlName in interface Actionpublic void setIndex(Integer index)
index - the index, indexes less than or equal to 1 will be discarded.@CheckForNull public Integer getIndex()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull public 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 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–2021. All rights reserved.