|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SBuild
Server-side instance of a build.
Method Summary | |
---|---|
void |
addBuildProblem(BuildProblemData buildProblem)
Adds build problem to the build. |
BuildProblemData |
addUserBuildProblem(SUser user,
java.lang.String problemDesciption)
Adds user provided build problem to the build. |
java.util.Date |
convertToAgentTime(java.util.Date serverTime)
Converts server time to agent time by taking into account agent and server time difference. |
java.util.Date |
convertToServerTime(java.util.Date agentTime)
Converts agent time to server time by taking into account agent and server time difference. |
SBuildAgent |
getAgent()
|
java.util.List<SArtifactDependency> |
getArtifactDependencies()
Returns the artifact dependencies of this build. |
BuildArtifacts |
getArtifacts(BuildArtifactsViewMode mode)
Returns accessor for build artifacts. |
java.io.File |
getArtifactsDirectory()
Returns artifacts directory of this build. |
Branch |
getBranch()
|
Comment |
getBuildComment()
Returns build comment. |
java.lang.String |
getBuildDescription()
Returns build description set to this build explicitly or null. |
java.util.Collection<SBuildFeatureDescriptor> |
getBuildFeaturesOfType(java.lang.String featureType)
Returns collection of enabled and resolved build features of specified type from build settings (resolving is performed at the moment of the method call). |
BuildLog |
getBuildLog()
Returns build log. |
java.util.Map<java.lang.String,java.lang.String> |
getBuildOwnParameters()
Returns map of parameters (configuration params, system properties and environment variables) excluding parameters provided by extensions. |
BuildStatistics |
getBuildStatistics(BuildStatisticsOptions options)
Same as getFullStatistics() but with more control of data being loaded. |
SBuildType |
getBuildType()
Returns build configuration this build belongs to. |
java.util.List<SVcsModification> |
getChanges(SelectPrevBuildPolicy policy,
boolean includeModificationsIfPreviousBuildIsAbsent)
List of modifications detected in the version control since the previous build (selected according to the specified policy) Ordering: last detected modifications goes first in the list |
java.util.Date |
getClientStartDate()
Returns the timestamp when the build was started on the build agent (in agent time) |
java.util.TimeZone |
getClientTimeZone()
Returns agent machine time zone if it's available on server. |
UserSet<SUser> |
getCommitters(SelectPrevBuildPolicy policy)
Returns all users who made modifications since the previous build selected according to the specified policy. |
java.util.List<SVcsModification> |
getContainingChanges()
Returns changes in this build. |
DownloadedArtifacts |
getDownloadedArtifacts()
Returns information about artifacts downloaded by this build according to configured artifact dependencies. |
java.util.List<BuildProblemData> |
getFailureReasons()
Returns build problems that caused build failure or empty list if build is successful |
byte[] |
getFileContent(java.lang.String filePath)
Get binary content of the single file related to this build. |
java.lang.String |
getFirstInternalError()
Returns the first internal error in a build, or null. |
java.lang.String |
getFirstInternalErrorMessage()
Returns the error message associated with the first internal error, or null |
BuildStatistics |
getFullStatistics()
Calculates full statistics for this build. |
java.util.List<VcsLabel> |
getLabels()
VCS labels which were made by TeamCity for the build. |
SUser |
getOwner()
If this build is personal one, returns the owner of this build. |
SFinishedBuild |
getPreviousFinished()
|
DownloadedArtifacts |
getProvidedArtifacts()
Returns information about provided artifacts, i.e. |
java.util.Date |
getQueuedDate()
Returns the date when the build was added to queue. |
java.lang.String |
getRawBuildNumber()
Returns raw build number (i.e. |
java.util.Collection<Issue> |
getRelatedIssues()
Returns the collection of related issues (e.g. |
java.util.List<BuildRevision> |
getRevisions()
List of all revisions which were used for the build instance |
java.util.Date |
getServerStartDate()
Returns the timestamp when the build was removed from the queue. |
ShortStatistics |
getShortStatistics()
Calculates short statistics for this build. |
java.math.BigDecimal |
getStatisticValue(java.lang.String valueTypeKey)
|
java.util.Map<java.lang.String,java.math.BigDecimal> |
getStatisticValues()
|
java.util.List<java.lang.String> |
getTags()
Returns list of public tags for this build |
TriggeredBy |
getTriggeredBy()
Returns details about how this build was triggered. |
ValueResolver |
getValueResolver()
Returns build-aware value resolver to be used to resolve values based on the build's properties. |
java.util.List<VcsRootInstanceEntry> |
getVcsRootEntries()
Returns vcs roots with checkout rules for the build start moment. |
boolean |
hasBuildProblemOfType(java.lang.String type)
Returns true if build has build problem of this type |
boolean |
isArtifactsExists()
Returns true if this build has artifacts. |
boolean |
isHasInternalArtifactsOnly()
Returns true if this build has only internal (hidden) artifacts. |
boolean |
isHasRelatedIssues()
Returns whether the build has related issues (e.g. |
boolean |
isInternalError()
Returns whether this build failed because of internal error (infrastructural error not related to build script). |
boolean |
isOutOfChangesSequence()
Returns true if there is a build started before but having more recent changes then this build. |
boolean |
isPinned()
Returns true if this build is pinned |
boolean |
isResponsibleNeeded()
Always returns false for personal and/or cancelled builds. |
boolean |
isStartedOnAgent()
Returns true if this build was started on agent. |
boolean |
isUsedByOtherBuilds()
Returns true if this build is used by other builds, i.e. |
void |
muteBuildProblems(SUser user,
boolean muteIfTrue,
java.lang.String comment)
Makes all existing build problems enabled or disabled |
void |
setBuildComment(User user,
java.lang.String comment)
Sets the comment for the build |
void |
setTags(java.util.List<java.lang.String> tags)
Sets public tags for this build |
void |
setTags(User user,
java.util.List<java.lang.String> tags)
Deprecated. Use {@link #setTags(List |
Methods inherited from interface jetbrains.buildServer.Build |
---|
getAgentName, getBuildId, getBuildNumber, getBuildStatus, getBuildTypeExternalId, getBuildTypeId, getBuildTypeName, getCanceledInfo, getCompilationErrorMessages, getDuration, getFinishDate, getFullName, getLogMessages, getProjectExternalId, getProjectId, getStartDate, getStatusDescriptor, getTestMessages, isFinished, isPersonal |
Methods inherited from interface jetbrains.buildServer.serverSide.BuildPromotionOwner |
---|
getBuildPromotion, getSequenceBuild |
Methods inherited from interface jetbrains.buildServer.serverSide.ParametersSupport |
---|
getParametersProvider |
Method Detail |
---|
@NotNull java.io.File getArtifactsDirectory()
ArtifactsGuard
for the period of their processing.
BuildTypeNotFoundException
- if build configuration of the build does not exist anymore@NotNull BuildArtifacts getArtifacts(@NotNull BuildArtifactsViewMode mode)
mode
- view mode to see artifacts
@NotNull java.util.List<SArtifactDependency> getArtifactDependencies()
boolean isArtifactsExists()
ArtifactsConstants.TEAMCITY_ARTIFACTS_DIR
,
isHasInternalArtifactsOnly()
boolean isHasInternalArtifactsOnly()
isArtifactsExists()
boolean isResponsibleNeeded()
@NotNull BuildLog getBuildLog()
@NotNull ShortStatistics getShortStatistics()
getBuildStatistics(jetbrains.buildServer.serverSide.BuildStatisticsOptions)
method.
@NotNull BuildStatistics getFullStatistics()
getBuildStatistics(BuildStatisticsOptions)
instead.
@NotNull BuildStatistics getBuildStatistics(@NotNull BuildStatisticsOptions options)
getFullStatistics()
but with more control of data being loaded.
options
- options
@Nullable SUser getOwner()
Build.isPersonal()
TriggeredBy getTriggeredBy()
@Nullable SBuildType getBuildType()
getBuildType
in interface Build
@NotNull DownloadedArtifacts getDownloadedArtifacts()
@NotNull DownloadedArtifacts getProvidedArtifacts()
boolean isUsedByOtherBuilds()
@NotNull java.util.List<SVcsModification> getContainingChanges()
Build
getContainingChanges
in interface Build
@NotNull java.util.List<SVcsModification> getChanges(SelectPrevBuildPolicy policy, boolean includeModificationsIfPreviousBuildIsAbsent)
Build
getChanges
in interface Build
policy
- can be one of the two kinds:
SelectPrevBuildPolicy.SINCE_LAST_BUILD
- all modifications made since previous running buildSelectPrevBuildPolicy.SINCE_LAST_SUCCESSFULLY_FINISHED_BUILD
- all modifications made since
previous successfully finished buildincludeModificationsIfPreviousBuildIsAbsent
- should the method return something if there's no previous build.
UserSet<SUser> getCommitters(SelectPrevBuildPolicy policy)
Build
BuildServerListener.changesLoaded
event for the build)
and will only return users with matching VCS usernames set.
getCommitters
in interface Build
policy
- can be one of the two kinds:
SelectPrevBuildPolicy.SINCE_LAST_BUILD
- all modifications made since previous running buildSelectPrevBuildPolicy.SINCE_LAST_SUCCESSFULLY_FINISHED_BUILD
- all modifications made since
previous successfully finished buildboolean isOutOfChangesSequence()
java.util.List<java.lang.String> getTags()
void setTags(java.util.List<java.lang.String> tags)
tags
- tags to set@Deprecated void setTags(User user, java.util.List<java.lang.String> tags)
user
- user who set tags, this user is not treated as tag owner - the user from security context, doesn't correspond to tags ownertags
- tag labels to set@NotNull byte[] getFileContent(java.lang.String filePath) throws VcsException
filePath
- - relative file path regarding to the project root,
"checkout root" from vcs root should not be included
VcsException
- if some problem occurred while getting file content from the source control repository.java.util.List<BuildRevision> getRevisions()
java.util.List<VcsLabel> getLabels()
@NotNull java.util.Date getQueuedDate()
@NotNull java.util.Date getServerStartDate()
java.util.List<VcsRootInstanceEntry> getVcsRootEntries()
@Nullable java.util.Date getClientStartDate()
boolean isStartedOnAgent()
@NotNull java.util.Date convertToServerTime(@NotNull java.util.Date agentTime)
agentTime
- time on agent
@NotNull java.util.Date convertToAgentTime(@NotNull java.util.Date serverTime)
serverTime
- server time to convert
@Nullable java.lang.String getBuildDescription()
@NotNull ValueResolver getValueResolver()
getValueResolver
in interface ParametersSupport
@Nullable Comment getBuildComment()
void setBuildComment(@Nullable User user, @Nullable java.lang.String comment)
user
- user who sets the commentcomment
- text of the commentboolean isPinned()
@NotNull java.util.Collection<Issue> getRelatedIssues()
isHasRelatedIssues()
,
SVcsModification.getRelatedIssues()
boolean isHasRelatedIssues()
getRelatedIssues()
,
SVcsModification.isHasRelatedIssues()
@NotNull java.util.Map<java.lang.String,java.lang.String> getBuildOwnParameters()
java.lang.String getRawBuildNumber()
Build.getBuildNumber()
method which will return build number with all unresolved parameters replaced with ???.
boolean isInternalError()
@Nullable java.lang.String getFirstInternalError()
@Nullable java.lang.String getFirstInternalErrorMessage()
@Nullable java.util.TimeZone getClientTimeZone()
@NotNull SBuildAgent getAgent()
void addBuildProblem(@NotNull BuildProblemData buildProblem)
boolean hasBuildProblemOfType(@NotNull java.lang.String type)
type
- build problem type
BuildProblemData
@NotNull java.util.List<BuildProblemData> getFailureReasons()
void muteBuildProblems(@NotNull SUser user, boolean muteIfTrue, @NotNull java.lang.String comment)
user
- user that will be used in auditmuteIfTrue
- pass true to make build successful, false to make existing problems visible againcomment
- comment for auditBuildProblemData addUserBuildProblem(@NotNull SUser user, @NotNull java.lang.String problemDesciption)
user
- user that will be used in audit
@Nullable Branch getBranch()
@Nullable SFinishedBuild getPreviousFinished()
@Nullable java.math.BigDecimal getStatisticValue(java.lang.String valueTypeKey)
valueTypeKey
- ValueType key to lookup. Eg TimeSpentInQueue, ArtifactsSize, DuplicatorStatsm CodeCoverageB, CodeCoverageC or any
custom build statistic value reported by service message during the build.
ValueProviderRegistry
@NotNull java.util.Map<java.lang.String,java.math.BigDecimal> getStatisticValues()
@NotNull java.util.Collection<SBuildFeatureDescriptor> getBuildFeaturesOfType(@NotNull java.lang.String featureType)
featureType
- type of the build feature
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |