com.atlassian.bamboo.v2.build
Interface CurrentlyBuilding

All Known Implementing Classes:
CurrentlyBuildingImpl

@ThreadSafe
public interface CurrentlyBuilding

This object encapsulates the BuildContext that'd being built and the BuildAgent id it's related to


Method Summary
 java.lang.Long getBuildAgentId()
          The current build agent id iff the build is current building on an agent
 java.lang.Long getBuildAverageDuration()
          How long on average has the build taken in the past.
 BuildCancelledDetails getBuildCancelledDetails()
           
 BuildChanges getBuildChanges()
          Changes associated with current build
 BuildHungDetails getBuildHangDetails()
          Details about the build if it hung.
 BuildIdentifier getBuildIdentifier()
          The ID of the build
 BuildQueueTimeoutDetails getBuildQueueTimeoutDetails()
          Details about the build if queue timeout was detected.
 java.lang.Long getBuildTime()
          How long has the build taken so far since checkout has finished? Method name should be getBuildDuration...
 java.util.Collection<BuildAgent> getExecutableBuildAgents()
          Get the list of executable agents for this build.
 java.util.Collection<ElasticImageConfiguration> getExecutableElasticImages()
          Get the list of elastic images that can execute this plan.
 BuildProgressBar getProgressBar()
          Track our progress of the current build
 java.util.Date getQueueTime()
          The Date when the build was originally quued
 java.util.Date getStartTime()
          When was the build was started.
 TriggerReason getTriggerReason()
          The trigger reason of the current build
 java.util.Date getVcsUpdateTime()
          The time Date when updating / checking out source repository began
 boolean hasExecutableAgents()
          Determine whether this plan currently has any agent that can run it.
 boolean isCurrentlyQueuedOnly()
          Is the build queued? Effectively checks if the getBuildAgentId() returns null
 boolean isUpdatingVcs()
           
 void setBuildAgentId(java.lang.Long agentId)
          Sets the fact that the build will now be building on an agent
 void setBuildCancelledDetails(BuildCancelledDetails buildCancelledDetails)
           
 void setBuildHangDetails(BuildHungDetails buildHungDetails)
          Set the details if the build was detected to be hung.
 void setBuildQueueTimeoutDetails(BuildQueueTimeoutDetails buildQueueTimeoutDetails)
          Sets build queue timeout details
 void setExecutableBuildAgents(java.util.Collection<BuildAgent> executableBuildAgents)
          Resets the executable build agents
 void setExecutableElasticImages(java.util.Collection<ElasticImageConfiguration> executableElasticImages)
          Resets the executable build agents
 void setVcsUpdateTime(java.util.Date vcsUpdateTime)
           
 void startTimer()
          Starts an internal timer to the currently running build
 void stopTimer()
          Stops the internal timer for the current running build
 

Method Detail

getBuildIdentifier

@NotNull
BuildIdentifier getBuildIdentifier()
The ID of the build

Returns:

getTriggerReason

@NotNull
TriggerReason getTriggerReason()
The trigger reason of the current build

Returns:

getBuildChanges

@NotNull
BuildChanges getBuildChanges()
Changes associated with current build

Returns:

getProgressBar

@NotNull
BuildProgressBar getProgressBar()
Track our progress of the current build

Returns:

getBuildAverageDuration

@NotNull
java.lang.Long getBuildAverageDuration()
How long on average has the build taken in the past. Used by the build progress bar.

Returns:
Long representing build average duration - in millis

getExecutableBuildAgents

@NotNull
java.util.Collection<BuildAgent> getExecutableBuildAgents()
Get the list of executable agents for this build. This mirrors the agent id's in the JMS message on the queue.

Returns:
- a list of BuildAgent which can execute this build.

setExecutableBuildAgents

void setExecutableBuildAgents(@NotNull
                              java.util.Collection<BuildAgent> executableBuildAgents)
Resets the executable build agents

Parameters:
executableBuildAgents - - a list of BuildAgent which can execute this build.

getExecutableElasticImages

@NotNull
java.util.Collection<ElasticImageConfiguration> getExecutableElasticImages()
Get the list of elastic images that can execute this plan.

Returns:
collection of ElasticImageConfiguration which can execute this plan

setExecutableElasticImages

void setExecutableElasticImages(@NotNull
                                java.util.Collection<ElasticImageConfiguration> executableElasticImages)
Resets the executable build agents

Parameters:
executableElasticImages - - a list of images that can run this build.

hasExecutableAgents

boolean hasExecutableAgents()
Determine whether this plan currently has any agent that can run it.

Returns:
True if at least one agent: meets all of the plans requirements is enabled is active (i.e. online), otherwise False.

getBuildAgentId

@Nullable
java.lang.Long getBuildAgentId()
The current build agent id iff the build is current building on an agent

Returns:

setBuildAgentId

void setBuildAgentId(@NotNull
                     java.lang.Long agentId)
Sets the fact that the build will now be building on an agent

Parameters:
agentId -

isCurrentlyQueuedOnly

boolean isCurrentlyQueuedOnly()
Is the build queued? Effectively checks if the getBuildAgentId() returns null

Returns:

startTimer

void startTimer()
Starts an internal timer to the currently running build


stopTimer

void stopTimer()
Stops the internal timer for the current running build


getBuildTime

@NotNull
java.lang.Long getBuildTime()
How long has the build taken so far since checkout has finished? Method name should be getBuildDuration...

Returns:
Long representing build time - in millis. 0 if not started

isUpdatingVcs

boolean isUpdatingVcs()

getStartTime

@Nullable
java.util.Date getStartTime()
When was the build was started. This is the time take from

Returns:
Date - when this CurrentBuildResult was generated

getQueueTime

@Nullable
java.util.Date getQueueTime()
The Date when the build was originally quued

Returns:

getVcsUpdateTime

@Nullable
java.util.Date getVcsUpdateTime()
The time Date when updating / checking out source repository began

Returns:

setVcsUpdateTime

void setVcsUpdateTime(@NotNull
                      java.util.Date vcsUpdateTime)

getBuildHangDetails

@Nullable
BuildHungDetails getBuildHangDetails()
Details about the build if it hung. Will be null if build was fine.

Returns:

setBuildHangDetails

void setBuildHangDetails(@Nullable
                         BuildHungDetails buildHungDetails)
Set the details if the build was detected to be hung.

Parameters:
buildHungDetails -

getBuildCancelledDetails

@Nullable
BuildCancelledDetails getBuildCancelledDetails()

setBuildCancelledDetails

void setBuildCancelledDetails(@Nullable
                              BuildCancelledDetails buildCancelledDetails)

getBuildQueueTimeoutDetails

@Nullable
BuildQueueTimeoutDetails getBuildQueueTimeoutDetails()
Details about the build if queue timeout was detected.

Returns:

setBuildQueueTimeoutDetails

void setBuildQueueTimeoutDetails(BuildQueueTimeoutDetails buildQueueTimeoutDetails)
Sets build queue timeout details

Parameters:
buildQueueTimeoutDetails -


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.