Package com.atlassian.bamboo.build
Interface BuildDefinition
-
- All Superinterfaces:
PartialBuildDefinition
- All Known Implementing Classes:
DefaultBuildDefinition
,PartialBuildDefinitionImpl
public interface BuildDefinition extends PartialBuildDefinition
Each build has aBuildDefinition
. This class encapsulate the configuration aspects of a build. What the actual builds look like? What should be executed?
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull BranchIntegrationConfiguration
getBranchIntegrationConfiguration()
Returns ChainBranch integration strategy settings, including the branch to merge with, and...@NotNull BranchMonitoringConfiguration
getBranchMonitoringConfiguration()
Returns the current branch monitoring configuration of a build plan.@NotNull BranchSpecificConfiguration
getBranchSpecificConfiguration()
Returns any configuration that is specific to a branch plan, and not so relevant for a normal plan.@NotNull Map<String,Object>
getConfigObjects()
Returns a map of objects generated by the plugins.@NotNull Map<String,String>
getCustomConfiguration()
/**@NotNull DockerPipelineConfiguration
getDockerPipelineConfiguration()
Set Docker pipeline configuration for a particular buildable.@NotNull Long
getRepositoryIdDefiningWorkingDir()
@NotNull List<TaskDefinition>
getTaskDefinitions()
All tasks defined for this build.@Nullable List<TriggerDefinition>
getTriggerDefinitions()
Definitions of all automatic build triggers defined for this build.@NotNull Boolean
isCleanWorkingDirectory()
Should the working directory be cleaned after build.boolean
isValidValue(@Nullable Object validValue)
Whether or not a given object is a valid value for this BuildDefinition.void
setBranchIntegrationConfiguration(BranchIntegrationConfiguration branchIntegrationConfiguration)
void
setBranchMonitoringConfiguration(@Nullable BranchMonitoringConfiguration branchMonitoringConfiguration)
void
setBranchSpecificConfiguration(BranchSpecificConfiguration branchSpecificConfiguration)
void
setCleanWorkingDirectory(boolean cleanWorkingDirectory)
Set the working directory be cleaned or not cleaned after buildvoid
setConfigObjects(@NotNull Map<String,Object> configObjects)
void
setCustomConfiguration(@NotNull Map<String,String> configMap)
A map of String key and String value pairs, representing customvoid
setDockerPipelineConfiguration(@NotNull DockerPipelineConfiguration dockerPipelineConfiguration)
Replace Docker pipeline configuration for this buildable with a different one.void
setMerged(boolean value)
Set whether or not this BuildDefinition has been merged from multiple sources.void
setRepositoryIdDefiningWorkingDir(long repositoryDefininingWorkingDir)
void
setTaskDefinitions(@NotNull List<TaskDefinition> taskDefinitions)
void
setTriggerDefinitions(@Nullable List<TriggerDefinition> triggerDefinitions)
Replace existing list of triggers with a new one.-
Methods inherited from interface com.atlassian.bamboo.build.PartialBuildDefinition
isMerged
-
-
-
-
Method Detail
-
getTriggerDefinitions
@Nullable @Nullable List<TriggerDefinition> getTriggerDefinitions()
Definitions of all automatic build triggers defined for this build. If this list is empty, Plan is only triggered manually or through dependencies.- Specified by:
getTriggerDefinitions
in interfacePartialBuildDefinition
- Returns:
- immutable list of defined triggers
-
setTriggerDefinitions
void setTriggerDefinitions(@Nullable @Nullable List<TriggerDefinition> triggerDefinitions)
Replace existing list of triggers with a new one. Setting null indicates that triggerDefinitions should be inherited from master chain.- Parameters:
triggerDefinitions
-List
ofTriggerDefinition
-
getBranchMonitoringConfiguration
@NotNull @NotNull BranchMonitoringConfiguration getBranchMonitoringConfiguration()
Returns the current branch monitoring configuration of a build plan. This configuration includes all plan branches settings, as if plan branch creation and plan branch cleanup are enabled, for instance.- Specified by:
getBranchMonitoringConfiguration
in interfacePartialBuildDefinition
- Returns:
BranchMonitoringConfiguration
-
setBranchMonitoringConfiguration
void setBranchMonitoringConfiguration(@Nullable @Nullable BranchMonitoringConfiguration branchMonitoringConfiguration)
-
getBranchIntegrationConfiguration
@NotNull @NotNull BranchIntegrationConfiguration getBranchIntegrationConfiguration()
Returns ChainBranch integration strategy settings, including the branch to merge with, and... //todo- Specified by:
getBranchIntegrationConfiguration
in interfacePartialBuildDefinition
- Returns:
- current
BranchIntegrationConfiguration
-
setBranchIntegrationConfiguration
void setBranchIntegrationConfiguration(BranchIntegrationConfiguration branchIntegrationConfiguration)
-
getBranchSpecificConfiguration
@NotNull @NotNull BranchSpecificConfiguration getBranchSpecificConfiguration()
Returns any configuration that is specific to a branch plan, and not so relevant for a normal plan.- Specified by:
getBranchSpecificConfiguration
in interfacePartialBuildDefinition
- Returns:
-
setBranchSpecificConfiguration
void setBranchSpecificConfiguration(BranchSpecificConfiguration branchSpecificConfiguration)
-
getCustomConfiguration
@NotNull @NotNull Map<String,String> getCustomConfiguration()
/**- Specified by:
getCustomConfiguration
in interfacePartialBuildDefinition
- Returns:
- a map consisting of String key and String value pairs. This is where fields which start with "custom" (eg. custom.test.id) go to
-
setCustomConfiguration
void setCustomConfiguration(@NotNull @NotNull Map<String,String> configMap)
A map of String key and String value pairs, representing custom- Parameters:
configMap
- - can be null
-
getConfigObjects
@NotNull @NotNull Map<String,Object> getConfigObjects()
Returns a map of objects generated by the plugins. Each plugin is responsible for populating this list, so there's no final guarantee that a key is unique.- Specified by:
getConfigObjects
in interfacePartialBuildDefinition
- Returns:
- A
Map
with aString
as a key and an arbitrary objects as the value.
-
getTaskDefinitions
@NotNull @NotNull List<TaskDefinition> getTaskDefinitions()
All tasks defined for this build. Contains both regular tasks and finalising tasks.- Specified by:
getTaskDefinitions
in interfacePartialBuildDefinition
- Returns:
- A
List
ofTaskDefinition
s
-
setTaskDefinitions
void setTaskDefinitions(@NotNull @NotNull List<TaskDefinition> taskDefinitions)
-
isCleanWorkingDirectory
@NotNull @NotNull Boolean isCleanWorkingDirectory()
Should the working directory be cleaned after build.- Specified by:
isCleanWorkingDirectory
in interfacePartialBuildDefinition
- Returns:
- cleanWorkingDirectory
-
setCleanWorkingDirectory
void setCleanWorkingDirectory(boolean cleanWorkingDirectory)
Set the working directory be cleaned or not cleaned after build- Parameters:
cleanWorkingDirectory
-
-
getRepositoryIdDefiningWorkingDir
@NotNull @NotNull Long getRepositoryIdDefiningWorkingDir()
- Specified by:
getRepositoryIdDefiningWorkingDir
in interfacePartialBuildDefinition
-
setRepositoryIdDefiningWorkingDir
void setRepositoryIdDefiningWorkingDir(long repositoryDefininingWorkingDir)
-
setMerged
void setMerged(boolean value)
Set whether or not this BuildDefinition has been merged from multiple sources. Merged definitions will not be persisted.- Parameters:
value
- true if merged
-
isValidValue
boolean isValidValue(@Nullable @Nullable Object validValue)
Whether or not a given object is a valid value for this BuildDefinition. For example, PartialBuildDefintions accept nulls.- Parameters:
validValue
-- Returns:
-
getDockerPipelineConfiguration
@NotNull @NotNull DockerPipelineConfiguration getDockerPipelineConfiguration()
Set Docker pipeline configuration for a particular buildable.- Specified by:
getDockerPipelineConfiguration
in interfacePartialBuildDefinition
-
setDockerPipelineConfiguration
void setDockerPipelineConfiguration(@NotNull @NotNull DockerPipelineConfiguration dockerPipelineConfiguration)
Replace Docker pipeline configuration for this buildable with a different one.
-
-