Package jetbrains.buildServer.serverSide
Interface QueuedBuildEx
-
- All Superinterfaces:
BuildPromotionOwner,BuildTypeDescriptor,Comparable<BuildTypeDescriptor>,CompatibleAgents,Loggable,QueuedBuild,QueuedBuildInfo,SQueuedBuild
- All Known Implementing Classes:
QueuedBuildImpl,SecuredQueuedBuild
public interface QueuedBuildEx extends SQueuedBuild, BuildTypeDescriptor, QueuedBuildInfo
- Author:
- Sergey.Anchipolevsky Date: 18.06.2007
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.BuildTypeDescriptor
BuildTypeDescriptor.CheckoutType
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.BuildTypeDescriptor
FULL_NAME_SEPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleancanRunInPool(int agentPoolId)SAgentRestrictorgetAgentRestrictor()SBuildAgentgetBuildAgent()Deprecated.usegetAgentRestrictor().BuildPromotionExgetBuildPromotion()Returns build promotionBuildTypeExgetBuildTypeEx()List<SBuildAgent>getCanRunOnAgents(List<SBuildAgent> availableAgents)List<StartableAgentType>getCanRunOnAgentTypes()StringgetLatestWaitReason()Map<String,Long>getWaitReasons()Returns current wait reasons for this queued build.booleanisCanBeReplacedByMergeOptimization()booleanisPersisted()booleanisStarted()Returns true if this build startedvoidmarkAsStarted()Called when a build started from this queued buildvoidmarkPersisted()voidremoveFailedToStartFromQueue()removes current build from queue without marking it as stated.RunningBuildExstartBuild(String requestor)Start build.voidstartChangesCollecting()voidterminate(boolean isCanceled, String comment, BuildProblemData buildProblemData)Removes current build from queue and creates a history build entry for it.booleantryLockBuildStarting()Should be called when build starts.voidunlockBuildStarting()Undoes start of a build, new build can be started from this queued build after that.-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildPromotionOwner
getSequenceBuild
-
Methods inherited from interface jetbrains.buildServer.BuildTypeDescriptor
getBuildTypeId, getCheckoutType, getDescription, getExternalId, getFullName, getName, getProjectExternalId, getProjectId, getProjectName, getRunnerTypes, isPaused, isPersonal
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface jetbrains.buildServer.serverSide.CompatibleAgents
getAgentCompatibility, getCompatibleAgents
-
Methods inherited from interface jetbrains.buildServer.QueuedBuild
getBuildAgentId, getBuildTypeId, getItemId, getOrderNumber, getWhenQueued, isPersonal
-
Methods inherited from interface jetbrains.buildServer.serverSide.buildDistribution.QueuedBuildInfo
getBuildAgentId, getBuildConfiguration, getBuildPromotionInfo, getCompatibleAgents, getItemId
-
Methods inherited from interface jetbrains.buildServer.serverSide.SQueuedBuild
getBuildEstimates, getBuildType, getCanRunOnAgents, getCompatibilityMap, getRequestor, getTriggeredBy, removeFromQueue
-
-
-
-
Method Detail
-
getBuildAgent
@Deprecated @Nullable SBuildAgent getBuildAgent()
Deprecated.usegetAgentRestrictor().- Specified by:
getBuildAgentin interfaceSQueuedBuild- Returns:
- build agent to run build on or null
-
getAgentRestrictor
@Nullable SAgentRestrictor getAgentRestrictor()
- Specified by:
getAgentRestrictorin interfaceQueuedBuild- Specified by:
getAgentRestrictorin interfaceQueuedBuildInfo- Returns:
- agent restrictor if the build is assigned to a specific set of agents, null otherwise.
- Since:
- 7.0
-
getCanRunOnAgentTypes
@NotNull List<StartableAgentType> getCanRunOnAgentTypes()
- Returns:
- available cloud agent types where this build can be started
- Since:
- 2017.1.4
-
getCanRunOnAgents
@NotNull List<SBuildAgent> getCanRunOnAgents(@NotNull List<SBuildAgent> availableAgents)
- Returns:
- accepts collection of agents and returns those where this queued build can run
- Since:
- 2017.1.4
-
canRunInPool
boolean canRunInPool(int agentPoolId)
- Since:
- 2020.2
-
getBuildPromotion
@NotNull BuildPromotionEx getBuildPromotion()
Description copied from interface:BuildPromotionOwnerReturns build promotion- Specified by:
getBuildPromotionin interfaceBuildPromotionOwner- Returns:
- see above.
-
tryLockBuildStarting
boolean tryLockBuildStarting()
Should be called when build starts. Returns true if build can be started or false if there is a build starting from this queued build.- Returns:
-
startChangesCollecting
void startChangesCollecting()
-
markAsStarted
void markAsStarted()
Called when a build started from this queued build
-
removeFailedToStartFromQueue
void removeFailedToStartFromQueue()
removes current build from queue without marking it as stated.
-
terminate
void terminate(boolean isCanceled, @Nullable String comment, @NotNull BuildProblemData buildProblemData)Removes current build from queue and creates a history build entry for it.- Parameters:
isCanceled- whether to create cancelation info for a history build entry. Status of the created build is also detrmined by this parameter: true->UNKNOWN, false->FAILURE.comment- comment to use for logging during remove operation as well as cancellation info comment if 'isCanceled' is truebuildProblemData- build problem to add to the history build- Throws:
IllegalArgumentException- in case 'isCanceled' is false and 'buildProblemData' type is not an internal error (seeErrorData.isInternalError(String))- Since:
- 2023.11.1
-
isStarted
boolean isStarted()
Returns true if this build started- Returns:
- true if this build started
-
unlockBuildStarting
void unlockBuildStarting()
Undoes start of a build, new build can be started from this queued build after that.
-
getBuildTypeEx
@NotNull BuildTypeEx getBuildTypeEx()
-
isPersisted
boolean isPersisted()
-
markPersisted
void markPersisted()
-
isCanBeReplacedByMergeOptimization
boolean isCanBeReplacedByMergeOptimization()
- Returns:
- true if this queued build can be optimized (removed from the queue by queue optimizer)
-
startBuild
@NotNull RunningBuildEx startBuild(@NotNull String requestor)
Start build. The method can be used to start build wihtout agent.- Parameters:
requestor- build requestor information like name or so- Since:
- 2019.2
-
getWaitReasons
@NotNull Map<String,Long> getWaitReasons()
Returns current wait reasons for this queued build. The key of the map is a wait reason description in human friendly form. The value is amount of milliseconds this wait reason was reported for this queued build.- Returns:
- map of a wait reason to amount of time it was reported for the build in milliseconds
- Since:
- 2022.1
-
getLatestWaitReason
@Nullable String getLatestWaitReason()
- Returns:
- the latest wait reason which prevented this build from starting.
-
-