com.atlassian.bamboo.v2.build
Interface BuildContext

All Superinterfaces:
BuildIdentifier, java.io.Serializable
All Known Implementing Classes:
BuildContextImpl

@ThreadSafe
public interface BuildContext
extends BuildIdentifier

A class that encapsulates how to build a particular plan at a given instance


Method Summary
 ArtifactContext getArtifactContext()
           
 BambooBandanaContext getBandanaContext()
          BandanaContext of the plan.
 BuildChanges getBuildChanges()
          Returns the build changes, if any, that represents the changes that triggered this build.
 BuildDefinition getBuildDefinition()
           
 CurrentBuildResult getBuildResult()
          The information about the results of a build
 java.util.Map<java.lang.Long,java.lang.String> getCheckoutLocation()
          Map holds final checkout where repository was checked out by VcsCheckoutTask Elements are kept in order of checkout
 ErrorCollection getErrorCollection()
          Any errors associated with the build
 BuildContext getParentBuildContext()
           
 java.util.Set<java.lang.Long> getRelevantRepositoryIds()
           
 java.util.Map<java.lang.Long,RepositoryDefinition> getRepositoryDefinitionMap()
           
 java.util.List<RepositoryDefinition> getRepositoryDefinitions()
           
 TriggerReason getTriggerReason()
          The reason this build was triggered
 VariableContext getVariableContext()
           
 boolean isBranch()
          Provides information if context refers to the branch of the Chain
 boolean isCustomBuild()
          Provides information if context refers to the build that had some variables overwritten
 boolean isOnceOff()
          Provides information if context refers to the "once-off" build - a build that have been run with customized revision
 void setBuildChanges(BuildChanges buildChanges)
           
 
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildIdentifier
getBuildNumber, getBuildResultKey, getParentBuildIdentifier, getPlanId, getPlanKey, getPlanName, getPlanResultKey, getProjectName, getShortName
 

Method Detail

getParentBuildContext

@Nullable
BuildContext getParentBuildContext()
Returns:
the BuildContext of the parent Plan execution. Should return null if the current BuildContext is for a TopLevelPlan

getTriggerReason

@NotNull
TriggerReason getTriggerReason()
The reason this build was triggered

Returns:
triggerReason

getBuildDefinition

@NotNull
BuildDefinition getBuildDefinition()
Returns:
BuildDefinition associated with Plan this context relates to

getArtifactContext

@NotNull
ArtifactContext getArtifactContext()
Returns:
Artifact data associated with Plan

getBuildChanges

@NotNull
BuildChanges getBuildChanges()
Returns the build changes, if any, that represents the changes that triggered this build.

Returns:
Never null. WIll return a build changes object with the appropriate list of changes, the list will be null if no changes were found.

setBuildChanges

void setBuildChanges(BuildChanges buildChanges)

getBuildResult

@NotNull
CurrentBuildResult getBuildResult()
The information about the results of a build

Returns:
CurrentBuildResult

getErrorCollection

@NotNull
ErrorCollection getErrorCollection()
Any errors associated with the build


getVariableContext

@NotNull
VariableContext getVariableContext()

getRepositoryDefinitionMap

@NotNull
java.util.Map<java.lang.Long,RepositoryDefinition> getRepositoryDefinitionMap()

getRepositoryDefinitions

@NotNull
java.util.List<RepositoryDefinition> getRepositoryDefinitions()

getRelevantRepositoryIds

@NotNull
java.util.Set<java.lang.Long> getRelevantRepositoryIds()
Returns:
a set of repository id's that are relevant to this particular job, i.e. these jobs do checkout of that repository

getCheckoutLocation

@NotNull
java.util.Map<java.lang.Long,java.lang.String> getCheckoutLocation()
Map holds final checkout where repository was checked out by VcsCheckoutTask Elements are kept in order of checkout

Returns:
map of repositoryId as Long and checkout location as String

isBranch

boolean isBranch()
Provides information if context refers to the branch of the Chain

Returns:
true if context refers to the chain branch

isOnceOff

boolean isOnceOff()
Provides information if context refers to the "once-off" build - a build that have been run with customized revision

Returns:
true if context refers to the chain branch

isCustomBuild

boolean isCustomBuild()
Provides information if context refers to the build that had some variables overwritten

Returns:
true if context refers to the build with overwritten variables

getBandanaContext

@NotNull
BambooBandanaContext getBandanaContext()
BandanaContext of the plan.

Returns:
BandanaContext of the plan


Copyright © 2012 Atlassian. All Rights Reserved.