Class DummyBuild
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.BaseBuild
-
- jetbrains.buildServer.serverSide.impl.DummyBuild
-
- All Implemented Interfaces:
Build
,BuildEx
,BuildPromotionOwner
,ParametersSupport
,SBuild
public class DummyBuild extends BaseBuild implements SBuild
- Author:
- Pavel.Sher
-
-
Field Summary
-
Fields inherited from class jetbrains.buildServer.serverSide.impl.BaseBuild
myBuildId, myContext, myStatsCallCounter, REMOTE_ARTIFACTS_PREFIX
-
-
Constructor Summary
Constructors Constructor Description DummyBuild(long buildId, BuildPromotionEx buildPromotion, BuildContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DepParametersMemoryOptimizedMap
doGetBuildFinishParameters()
protected DepParametersMemoryOptimizedMap
doGetBuildStartParameters()
boolean
equals(Object o)
BuildAgentEx
getAgent()
String
getAgentName()
Returns agent name where build is running or happened to run if finished.long
getBuildCounter()
String
getBuildDescription()
Returns build description set to this build explicitly or null.BuildLogEx
getBuildLog()
Returns build log.String
getBuildNumber()
Returns build number in the user defined format (unresolved parameters in build number will be replaced with '???').BuildPromotionEx
getBuildPromotion()
Returns build promotionShortStatistics
getCachedShortStatistics(boolean calculateIfAbsent)
Return cached short statistics for this build.CanceledInfo
getCanceledInfo()
Returns info related to interrupted build.Date
getFinishDate()
Returns finish timestamp for the build (server time) ornull
if it hasn't been finished yet.Date
getFinishOnAgentDate()
Returns timestamp when the build finished on agent (server time) ornull
if it is still running on agent.String
getProjectExternalId()
Returns external id of the project this build belongs to.String
getProjectId()
Returns internal id of the project this build belongs to.Date
getQueuedDate()
Returns the date when the build was added to queue.String
getRawBuildNumber()
Returns raw build number (i.e.Date
getServerStartDate()
Returns the timestamp when the build was removed from the queue.Date
getStartDate()
Returns timestamp when the build start command has been sent to an agent (server-time) or remove from queue time if start command has not been sentStatusDescriptor
getStatusDescriptor()
Returns status descriptor of the buildList<TestInfo>
getTestMessages(int startFromIdx, int maxTestsToLoad)
Retrieves information about tests failed in the build.TriggeredBy
getTriggeredBy()
Returns details about how this build was triggered.ValueResolver
getValueResolver(ParametersProvider paramsProvider)
boolean
hasBuildFinishParameters()
int
hashCode()
boolean
isCompositeBuild()
Returns true if this build is a composite build.boolean
isFinished()
protected void
notifyOnBuildProblemsChanged(List<BuildProblemData> before, List<BuildProblemData> after)
String
toString()
-
Methods inherited from class jetbrains.buildServer.serverSide.impl.BaseBuild
addBuildProblem, addUserBuildProblem, buildProblemsChanged, convertToAgentTime, convertToServerTime, createShortStatistics, deleteBuildProblem, getArtifactDependencies, getArtifacts, getArtifactsDirectory, getAuditLogFactory, getAuditLogProvider, getBranch, getBuildComment, getBuildContext, getBuildFeaturesOfType, getBuildFinishParameters, getBuildId, getBuildNumberParameters, getBuildNumberWithoutRefs, getBuildOwnParameters, getBuildProblems, getBuildStartParameters, getBuildStatistics, getBuildStatus, getBuildType, getBuildTypeExternalId, getBuildTypeId, getBuildTypeName, getChanges, getClientStartDate, getClientTimeZone, getCommitters, getCompilationErrorMessages, getContainingChanges, getCustomDataStorage, getCustomDataStorageIdsByPrefix, getDetachFromAgentReceivedTimestamp, getDownloadedArtifacts, getDuration, getDurationOnAgent, getFailureReasons, getFileContent, getFirstInternalError, getFirstInternalErrorMessage, getFullName, getFullStatistics, getId, getLabels, getLogMessages, getOwner, getParametersProvider, getPreviousFinished, getProvidedArtifacts, getRecentlyFinishedBuild, getRelatedIssues, getRemoteArtifacts, getRemoteArtifactsByType, getRevisions, getSequenceBuild, getSettingsDigestFile, getSettingsDigestFromFile, getShortStatistics, getStatisticValue, getStatisticValues, getStatus, getTags, getTemporaryCustomDataStorage, getValueResolver, getValueResolver, getValueResolver, getVariablesProvider, getVcsRootEntries, getWaitReasons, hasBuildProblemOfType, hasTests, initMetrics, isAgentLessBuild, isArtifactsExists, isDetachedFromAgent, isHasInternalArtifactsOnly, isHasRelatedIssues, isInternalError, isOutdated, isOutOfChangesSequence, isPersonal, isPersonalPatchAvailable, isPinned, isResponsibleNeeded, isStartedOnAgent, isTimedOut, isUsedByOtherBuilds, muteBuildProblems, muteBuildProblems, now, nowDate, preloadFailedTests, publishStatisticValue, resetBuildFinalParameters, setBuildComment, setBuildStartTimes, setTags, setTags, updateExternalArtifactsInfoOnAccess
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.Build
getBuildId, getBuildStatus, getBuildTypeExternalId, getBuildTypeId, getBuildTypeName, getCompilationErrorMessages, getDuration, getFullName, getLogMessages, isPersonal
-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildPromotionOwner
getSequenceBuild
-
Methods inherited from interface jetbrains.buildServer.serverSide.ParametersSupport
getParametersProvider
-
Methods inherited from interface jetbrains.buildServer.serverSide.SBuild
addBuildProblem, addUserBuildProblem, convertToAgentTime, convertToServerTime, getArtifactDependencies, getArtifacts, getArtifactsDirectory, getBranch, getBuildComment, getBuildFeaturesOfType, getBuildOwnParameters, getBuildStatistics, getBuildType, getChanges, getClientStartDate, getClientTimeZone, getCommitters, getContainingChanges, getCustomDataStorage, getDownloadedArtifacts, getFailureReasons, getFileContent, getFirstInternalError, getFirstInternalErrorMessage, getFullStatistics, getLabels, getOwner, getPreviousFinished, getProvidedArtifacts, getRecentlyFinishedBuild, getRelatedIssues, getRemoteArtifacts, getRemoteArtifactsByType, getRevisions, getShortStatistics, getStatisticValue, getStatisticValues, getTags, getValueResolver, getVcsRootEntries, getWaitReasons, hasBuildProblemOfType, hasTests, isAgentLessBuild, isArtifactsExists, isDetachedFromAgent, isHasInternalArtifactsOnly, isHasRelatedIssues, isInternalError, isOutdated, isOutOfChangesSequence, isPinned, isResponsibleNeeded, isStartedOnAgent, isUsedByOtherBuilds, muteBuildProblems, setBuildComment, setTags, setTags
-
-
-
-
Constructor Detail
-
DummyBuild
public DummyBuild(long buildId, @NotNull BuildPromotionEx buildPromotion, @NotNull BuildContext context)
-
-
Method Detail
-
getBuildLog
@NotNull public BuildLogEx getBuildLog()
Description copied from interface:SBuild
Returns build log.- Specified by:
getBuildLog
in interfaceBuildEx
- Specified by:
getBuildLog
in interfaceSBuild
- Returns:
- build log.
-
getQueuedDate
@NotNull public Date getQueuedDate()
Description copied from interface:SBuild
Returns the date when the build was added to queue.- Specified by:
getQueuedDate
in interfaceSBuild
- Overrides:
getQueuedDate
in classBaseBuild
- Returns:
- queued time.
-
getStartDate
@NotNull public Date getStartDate()
Description copied from interface:Build
Returns timestamp when the build start command has been sent to an agent (server-time) or remove from queue time if start command has not been sent- Specified by:
getStartDate
in interfaceBuild
- Overrides:
getStartDate
in classBaseBuild
- Returns:
- see above
-
getServerStartDate
@NotNull public Date getServerStartDate()
Description copied from interface:SBuild
Returns the timestamp when the build was removed from the queue.- Specified by:
getServerStartDate
in interfaceSBuild
- Overrides:
getServerStartDate
in classBaseBuild
- Returns:
- the timestamp when the build was removed from the queue.
-
getCachedShortStatistics
@Nullable public ShortStatistics getCachedShortStatistics(boolean calculateIfAbsent)
Description copied from interface:BuildEx
Return cached short statistics for this build.- Specified by:
getCachedShortStatistics
in interfaceBuildEx
- Parameters:
calculateIfAbsent
- if true, then statistics is calculated if it is not cached yet, if false and there is no statistics in cache, then null is returned- Returns:
- see above
-
getBuildDescription
public String getBuildDescription()
Description copied from interface:SBuild
Returns build description set to this build explicitly or null.- Specified by:
getBuildDescription
in interfaceSBuild
- Returns:
- see above
-
getAgentName
public String getAgentName()
Description copied from interface:Build
Returns agent name where build is running or happened to run if finished.- Specified by:
getAgentName
in interfaceBuild
- Returns:
- Agent name where build has been started on
-
getStatusDescriptor
public StatusDescriptor getStatusDescriptor()
Description copied from interface:Build
Returns status descriptor of the build- Specified by:
getStatusDescriptor
in interfaceBuild
- Returns:
- Descriptor of the current status of the build
-
getTestMessages
public List<TestInfo> getTestMessages(int startFromIdx, int maxTestsToLoad)
Description copied from interface:Build
Retrieves information about tests failed in the build. Note that for running build currently executing test will be added to the list too.- Specified by:
getTestMessages
in interfaceBuild
- Overrides:
getTestMessages
in classBaseBuild
- Parameters:
startFromIdx
- index/order number of the first test to load (zero based)maxTestsToLoad
- indicates how many tests to load, -1 to load all- Returns:
- list of plain messages
-
getAgent
@NotNull public BuildAgentEx getAgent()
-
isCompositeBuild
public boolean isCompositeBuild()
Description copied from interface:SBuild
Returns true if this build is a composite build.- Specified by:
isCompositeBuild
in interfaceSBuild
- Returns:
- see above
-
notifyOnBuildProblemsChanged
protected void notifyOnBuildProblemsChanged(@NotNull List<BuildProblemData> before, @NotNull List<BuildProblemData> after)
- Specified by:
notifyOnBuildProblemsChanged
in classBaseBuild
-
getProjectId
public String getProjectId()
Description copied from interface:Build
Returns internal id of the project this build belongs to. Same as getBuildType().getProjectId().- Specified by:
getProjectId
in interfaceBuild
- Returns:
- internal id of the project this build belongs to. Same as getBuildType().getProjectId().
-
getProjectExternalId
public String getProjectExternalId()
Description copied from interface:Build
Returns external id of the project this build belongs to. Same as getBuildType().getProjectId().- Specified by:
getProjectExternalId
in interfaceBuild
- Returns:
- external id of the project this build belongs to. Same as getBuildType().getProjectId().
-
isFinished
public boolean isFinished()
- Specified by:
isFinished
in interfaceBuild
- Returns:
- true if the build was finished and was saved to the history
-
getBuildNumber
@NotNull public String getBuildNumber()
Description copied from interface:Build
Returns build number in the user defined format (unresolved parameters in build number will be replaced with '???').- Specified by:
getBuildNumber
in interfaceBuild
- Returns:
- presentable build number
-
getFinishDate
public Date getFinishDate()
Description copied from interface:Build
Returns finish timestamp for the build (server time) ornull
if it hasn't been finished yet.- Specified by:
getFinishDate
in interfaceBuild
- Returns:
- Date/time when the build has been finished,
null
if still running.
-
getFinishOnAgentDate
@Nullable public Date getFinishOnAgentDate()
Description copied from interface:SBuild
Returns timestamp when the build finished on agent (server time) ornull
if it is still running on agent.- Specified by:
getFinishOnAgentDate
in interfaceSBuild
- Overrides:
getFinishOnAgentDate
in classBaseBuild
- Returns:
- see above
-
getCanceledInfo
public CanceledInfo getCanceledInfo()
Description copied from interface:Build
Returns info related to interrupted build. If build is finished, not interrupted, the value is null.- Specified by:
getCanceledInfo
in interfaceBuild
- Returns:
- info about canceled reason and canceler if build was actually interrupted, null otherwise.
-
getRawBuildNumber
public String getRawBuildNumber()
Description copied from interface:SBuild
Returns raw build number (i.e. build number with unresolved parameters if they exist) in contradistinction toBuild.getBuildNumber()
method which will return build number with all unresolved parameters replaced with ???.- Specified by:
getRawBuildNumber
in interfaceSBuild
- Specified by:
getRawBuildNumber
in classBaseBuild
- Returns:
- raw build number which can contain unresolved parameters
-
getBuildCounter
public long getBuildCounter()
- Specified by:
getBuildCounter
in classBaseBuild
-
hasBuildFinishParameters
public boolean hasBuildFinishParameters()
- Overrides:
hasBuildFinishParameters
in classBaseBuild
-
getValueResolver
@NotNull public ValueResolver getValueResolver(@NotNull ParametersProvider paramsProvider)
-
doGetBuildFinishParameters
@Nullable protected DepParametersMemoryOptimizedMap doGetBuildFinishParameters()
- Overrides:
doGetBuildFinishParameters
in classBaseBuild
-
doGetBuildStartParameters
@Nullable protected DepParametersMemoryOptimizedMap doGetBuildStartParameters()
- Overrides:
doGetBuildStartParameters
in classBaseBuild
-
getBuildPromotion
@NotNull public BuildPromotionEx getBuildPromotion()
Description copied from interface:BuildPromotionOwner
Returns build promotion- Specified by:
getBuildPromotion
in interfaceBuildEx
- Specified by:
getBuildPromotion
in interfaceBuildPromotionOwner
- Specified by:
getBuildPromotion
in classBaseBuild
- Returns:
- see above.
-
getTriggeredBy
@NotNull public TriggeredBy getTriggeredBy()
Description copied from interface:SBuild
Returns details about how this build was triggered.- Specified by:
getTriggeredBy
in interfaceSBuild
- Overrides:
getTriggeredBy
in classBaseBuild
- Returns:
- see above
-
-