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 DepParametersMemoryOptimizedMapdoGetBuildFinishParameters()protected DepParametersMemoryOptimizedMapdoGetBuildStartParameters()booleanequals(Object o)BuildAgentExgetAgent()StringgetAgentName()Returns agent name where build is running or happened to run if finished.longgetBuildCounter()StringgetBuildDescription()Returns build description set to this build explicitly or null.BuildLogExgetBuildLog()Returns build log.StringgetBuildNumber()Returns build number in the user defined format (unresolved parameters in build number will be replaced with '???').BuildPromotionExgetBuildPromotion()Returns build promotionShortStatisticsgetCachedShortStatistics(boolean calculateIfAbsent)Return cached short statistics for this build.CanceledInfogetCanceledInfo()Returns info related to interrupted build.DategetFinishDate()Returns finish timestamp for the build (server time) ornullif it hasn't been finished yet.DategetFinishOnAgentDate()Returns timestamp when the build finished on agent (server time) ornullif it is still running on agent.StringgetProjectExternalId()Returns external id of the project this build belongs to.StringgetProjectId()Returns internal id of the project this build belongs to.DategetQueuedDate()Returns the date when the build was added to queue.StringgetRawBuildNumber()Returns raw build number (i.e.DategetServerStartDate()Returns the timestamp when the build was removed from the queue.DategetStartDate()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 sentStatusDescriptorgetStatusDescriptor()Returns status descriptor of the buildList<TestInfo>getTestMessages(int startFromIdx, int maxTestsToLoad)Retrieves information about tests failed in the build.TriggeredBygetTriggeredBy()Returns details about how this build was triggered.ValueResolvergetValueResolver(ParametersProvider paramsProvider)booleanhasBuildFinishParameters()inthashCode()booleanisCompositeBuild()Returns true if this build is a composite build.booleanisFinished()protected voidnotifyOnBuildProblemsChanged(List<BuildProblemData> before, List<BuildProblemData> after)StringtoString()-
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:SBuildReturns build log.- Specified by:
getBuildLogin interfaceBuildEx- Specified by:
getBuildLogin interfaceSBuild- Returns:
- build log.
-
getQueuedDate
@NotNull public Date getQueuedDate()
Description copied from interface:SBuildReturns the date when the build was added to queue.- Specified by:
getQueuedDatein interfaceSBuild- Overrides:
getQueuedDatein classBaseBuild- Returns:
- queued time.
-
getStartDate
@NotNull public Date getStartDate()
Description copied from interface:BuildReturns 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:
getStartDatein interfaceBuild- Overrides:
getStartDatein classBaseBuild- Returns:
- see above
-
getServerStartDate
@NotNull public Date getServerStartDate()
Description copied from interface:SBuildReturns the timestamp when the build was removed from the queue.- Specified by:
getServerStartDatein interfaceSBuild- Overrides:
getServerStartDatein classBaseBuild- Returns:
- the timestamp when the build was removed from the queue.
-
getCachedShortStatistics
@Nullable public ShortStatistics getCachedShortStatistics(boolean calculateIfAbsent)
Description copied from interface:BuildExReturn cached short statistics for this build.- Specified by:
getCachedShortStatisticsin 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:SBuildReturns build description set to this build explicitly or null.- Specified by:
getBuildDescriptionin interfaceSBuild- Returns:
- see above
-
getAgentName
public String getAgentName()
Description copied from interface:BuildReturns agent name where build is running or happened to run if finished.- Specified by:
getAgentNamein interfaceBuild- Returns:
- Agent name where build has been started on
-
getStatusDescriptor
public StatusDescriptor getStatusDescriptor()
Description copied from interface:BuildReturns status descriptor of the build- Specified by:
getStatusDescriptorin interfaceBuild- Returns:
- Descriptor of the current status of the build
-
getTestMessages
public List<TestInfo> getTestMessages(int startFromIdx, int maxTestsToLoad)
Description copied from interface:BuildRetrieves information about tests failed in the build. Note that for running build currently executing test will be added to the list too.- Specified by:
getTestMessagesin interfaceBuild- Overrides:
getTestMessagesin 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:SBuildReturns true if this build is a composite build.- Specified by:
isCompositeBuildin interfaceSBuild- Returns:
- see above
-
notifyOnBuildProblemsChanged
protected void notifyOnBuildProblemsChanged(@NotNull List<BuildProblemData> before, @NotNull List<BuildProblemData> after)- Specified by:
notifyOnBuildProblemsChangedin classBaseBuild
-
getProjectId
public String getProjectId()
Description copied from interface:BuildReturns internal id of the project this build belongs to. Same as getBuildType().getProjectId().- Specified by:
getProjectIdin interfaceBuild- Returns:
- internal id of the project this build belongs to. Same as getBuildType().getProjectId().
-
getProjectExternalId
public String getProjectExternalId()
Description copied from interface:BuildReturns external id of the project this build belongs to. Same as getBuildType().getProjectId().- Specified by:
getProjectExternalIdin interfaceBuild- Returns:
- external id of the project this build belongs to. Same as getBuildType().getProjectId().
-
isFinished
public boolean isFinished()
- Specified by:
isFinishedin interfaceBuild- Returns:
- true if the build was finished and was saved to the history
-
getBuildNumber
@NotNull public String getBuildNumber()
Description copied from interface:BuildReturns build number in the user defined format (unresolved parameters in build number will be replaced with '???').- Specified by:
getBuildNumberin interfaceBuild- Returns:
- presentable build number
-
getFinishDate
public Date getFinishDate()
Description copied from interface:BuildReturns finish timestamp for the build (server time) ornullif it hasn't been finished yet.- Specified by:
getFinishDatein interfaceBuild- Returns:
- Date/time when the build has been finished,
nullif still running.
-
getFinishOnAgentDate
@Nullable public Date getFinishOnAgentDate()
Description copied from interface:SBuildReturns timestamp when the build finished on agent (server time) ornullif it is still running on agent.- Specified by:
getFinishOnAgentDatein interfaceSBuild- Overrides:
getFinishOnAgentDatein classBaseBuild- Returns:
- see above
-
getCanceledInfo
public CanceledInfo getCanceledInfo()
Description copied from interface:BuildReturns info related to interrupted build. If build is finished, not interrupted, the value is null.- Specified by:
getCanceledInfoin interfaceBuild- Returns:
- info about canceled reason and canceler if build was actually interrupted, null otherwise.
-
getRawBuildNumber
public String getRawBuildNumber()
Description copied from interface:SBuildReturns 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:
getRawBuildNumberin interfaceSBuild- Specified by:
getRawBuildNumberin classBaseBuild- Returns:
- raw build number which can contain unresolved parameters
-
getBuildCounter
public long getBuildCounter()
- Specified by:
getBuildCounterin classBaseBuild
-
hasBuildFinishParameters
public boolean hasBuildFinishParameters()
- Overrides:
hasBuildFinishParametersin classBaseBuild
-
getValueResolver
@NotNull public ValueResolver getValueResolver(@NotNull ParametersProvider paramsProvider)
-
doGetBuildFinishParameters
@Nullable protected DepParametersMemoryOptimizedMap doGetBuildFinishParameters()
- Overrides:
doGetBuildFinishParametersin classBaseBuild
-
doGetBuildStartParameters
@Nullable protected DepParametersMemoryOptimizedMap doGetBuildStartParameters()
- Overrides:
doGetBuildStartParametersin classBaseBuild
-
getBuildPromotion
@NotNull public BuildPromotionEx getBuildPromotion()
Description copied from interface:BuildPromotionOwnerReturns build promotion- Specified by:
getBuildPromotionin interfaceBuildEx- Specified by:
getBuildPromotionin interfaceBuildPromotionOwner- Specified by:
getBuildPromotionin classBaseBuild- Returns:
- see above.
-
getTriggeredBy
@NotNull public TriggeredBy getTriggeredBy()
Description copied from interface:SBuildReturns details about how this build was triggered.- Specified by:
getTriggeredByin interfaceSBuild- Overrides:
getTriggeredByin classBaseBuild- Returns:
- see above
-
-