Package com.atlassian.bamboo.build
Class DefaultBuildDefinition
- java.lang.Object
-
- com.atlassian.bamboo.build.DefaultBuildDefinition
-
- All Implemented Interfaces:
BuildDefinition
,PartialBuildDefinition
- Direct Known Subclasses:
PartialBuildDefinitionImpl
public class DefaultBuildDefinition extends Object implements BuildDefinition
-
-
Field Summary
Fields Modifier and Type Field Description protected BranchIntegrationConfiguration
branchIntegrationConfiguration
protected BranchMonitoringConfiguration
branchMonitoringConfiguration
protected BranchSpecificConfiguration
branchSpecificConfiguration
protected Boolean
cleanWorkingDirectory
protected Map<String,Object>
configObjects
protected FinalHashMap<String,String>
customConfiguration
protected DockerPipelineConfiguration
dockerPipelineConfiguration
protected Long
repositoryDefiningWorkingDir
protected List<TaskDefinition>
taskDefinitions
protected FinalArrayList<TriggerDefinition>
triggerDefinitions
-
Constructor Summary
Constructors Constructor Description DefaultBuildDefinition(boolean merged)
DefaultBuildDefinition(@NotNull BuildDefinition other)
-
Method Summary
All Methods Instance Methods Concrete 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
isMerged()
boolean
isValidValue(@Nullable Object validValue)
Whether or not a given object is a valid value for this BuildDefinition.void
setBranchIntegrationConfiguration(@Nullable 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> customConfiguration)
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 repositoryDefiningWorkingDir)
void
setTaskDefinitions(@NotNull List<TaskDefinition> taskConfigs)
void
setTriggerDefinitions(@Nullable List<TriggerDefinition> triggerDefinitions)
Replace existing list of triggers with a new one.
-
-
-
Field Detail
-
cleanWorkingDirectory
protected Boolean cleanWorkingDirectory
-
branchMonitoringConfiguration
protected transient BranchMonitoringConfiguration branchMonitoringConfiguration
-
branchIntegrationConfiguration
protected BranchIntegrationConfiguration branchIntegrationConfiguration
-
branchSpecificConfiguration
protected BranchSpecificConfiguration branchSpecificConfiguration
-
dockerPipelineConfiguration
protected DockerPipelineConfiguration dockerPipelineConfiguration
-
customConfiguration
protected FinalHashMap<String,String> customConfiguration
-
taskDefinitions
protected transient List<TaskDefinition> taskDefinitions
-
triggerDefinitions
protected FinalArrayList<TriggerDefinition> triggerDefinitions
-
repositoryDefiningWorkingDir
protected Long repositoryDefiningWorkingDir
-
-
Constructor Detail
-
DefaultBuildDefinition
public DefaultBuildDefinition(boolean merged)
-
DefaultBuildDefinition
public DefaultBuildDefinition(@NotNull @NotNull BuildDefinition other)
-
-
Method Detail
-
getTriggerDefinitions
@Nullable public @Nullable List<TriggerDefinition> getTriggerDefinitions()
Description copied from interface:BuildDefinition
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 interfaceBuildDefinition
- Specified by:
getTriggerDefinitions
in interfacePartialBuildDefinition
- Returns:
- immutable list of defined triggers
-
setTriggerDefinitions
public void setTriggerDefinitions(@Nullable @Nullable List<TriggerDefinition> triggerDefinitions)
Description copied from interface:BuildDefinition
Replace existing list of triggers with a new one. Setting null indicates that triggerDefinitions should be inherited from master chain.- Specified by:
setTriggerDefinitions
in interfaceBuildDefinition
- Parameters:
triggerDefinitions
-List
ofTriggerDefinition
-
getBranchMonitoringConfiguration
@NotNull public @NotNull BranchMonitoringConfiguration getBranchMonitoringConfiguration()
Description copied from interface:BuildDefinition
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 interfaceBuildDefinition
- Specified by:
getBranchMonitoringConfiguration
in interfacePartialBuildDefinition
- Returns:
BranchMonitoringConfiguration
-
setBranchMonitoringConfiguration
public void setBranchMonitoringConfiguration(@Nullable @Nullable BranchMonitoringConfiguration branchMonitoringConfiguration)
- Specified by:
setBranchMonitoringConfiguration
in interfaceBuildDefinition
-
getBranchIntegrationConfiguration
@NotNull public @NotNull BranchIntegrationConfiguration getBranchIntegrationConfiguration()
Description copied from interface:BuildDefinition
Returns ChainBranch integration strategy settings, including the branch to merge with, and... //todo- Specified by:
getBranchIntegrationConfiguration
in interfaceBuildDefinition
- Specified by:
getBranchIntegrationConfiguration
in interfacePartialBuildDefinition
- Returns:
- current
BranchIntegrationConfiguration
-
setBranchIntegrationConfiguration
public void setBranchIntegrationConfiguration(@Nullable @Nullable BranchIntegrationConfiguration branchIntegrationConfiguration)
- Specified by:
setBranchIntegrationConfiguration
in interfaceBuildDefinition
-
getCustomConfiguration
@NotNull public @NotNull Map<String,String> getCustomConfiguration()
Description copied from interface:BuildDefinition
/**- Specified by:
getCustomConfiguration
in interfaceBuildDefinition
- 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
public void setCustomConfiguration(@NotNull @NotNull Map<String,String> customConfiguration)
Description copied from interface:BuildDefinition
A map of String key and String value pairs, representing custom- Specified by:
setCustomConfiguration
in interfaceBuildDefinition
- Parameters:
customConfiguration
- - can be null
-
getConfigObjects
@NotNull public @NotNull Map<String,Object> getConfigObjects()
Description copied from interface:BuildDefinition
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 interfaceBuildDefinition
- Specified by:
getConfigObjects
in interfacePartialBuildDefinition
- Returns:
- A
Map
with aString
as a key and an arbitrary objects as the value.
-
setConfigObjects
public void setConfigObjects(@NotNull @NotNull Map<String,Object> configObjects)
- Specified by:
setConfigObjects
in interfaceBuildDefinition
-
getTaskDefinitions
@NotNull public @NotNull List<TaskDefinition> getTaskDefinitions()
Description copied from interface:BuildDefinition
All tasks defined for this build. Contains both regular tasks and finalising tasks.- Specified by:
getTaskDefinitions
in interfaceBuildDefinition
- Specified by:
getTaskDefinitions
in interfacePartialBuildDefinition
- Returns:
- A
List
ofTaskDefinition
s
-
setTaskDefinitions
public void setTaskDefinitions(@NotNull @NotNull List<TaskDefinition> taskConfigs)
- Specified by:
setTaskDefinitions
in interfaceBuildDefinition
-
isCleanWorkingDirectory
@NotNull public @NotNull Boolean isCleanWorkingDirectory()
Description copied from interface:BuildDefinition
Should the working directory be cleaned after build.- Specified by:
isCleanWorkingDirectory
in interfaceBuildDefinition
- Specified by:
isCleanWorkingDirectory
in interfacePartialBuildDefinition
- Returns:
- cleanWorkingDirectory
-
setCleanWorkingDirectory
public void setCleanWorkingDirectory(boolean cleanWorkingDirectory)
Description copied from interface:BuildDefinition
Set the working directory be cleaned or not cleaned after build- Specified by:
setCleanWorkingDirectory
in interfaceBuildDefinition
-
getRepositoryIdDefiningWorkingDir
@NotNull public @NotNull Long getRepositoryIdDefiningWorkingDir()
- Specified by:
getRepositoryIdDefiningWorkingDir
in interfaceBuildDefinition
- Specified by:
getRepositoryIdDefiningWorkingDir
in interfacePartialBuildDefinition
-
setRepositoryIdDefiningWorkingDir
public void setRepositoryIdDefiningWorkingDir(long repositoryDefiningWorkingDir)
- Specified by:
setRepositoryIdDefiningWorkingDir
in interfaceBuildDefinition
-
getBranchSpecificConfiguration
@NotNull public @NotNull BranchSpecificConfiguration getBranchSpecificConfiguration()
Description copied from interface:BuildDefinition
Returns any configuration that is specific to a branch plan, and not so relevant for a normal plan.- Specified by:
getBranchSpecificConfiguration
in interfaceBuildDefinition
- Specified by:
getBranchSpecificConfiguration
in interfacePartialBuildDefinition
- Returns:
-
setBranchSpecificConfiguration
public void setBranchSpecificConfiguration(BranchSpecificConfiguration branchSpecificConfiguration)
- Specified by:
setBranchSpecificConfiguration
in interfaceBuildDefinition
-
getDockerPipelineConfiguration
@NotNull public @NotNull DockerPipelineConfiguration getDockerPipelineConfiguration()
Description copied from interface:BuildDefinition
Set Docker pipeline configuration for a particular buildable.- Specified by:
getDockerPipelineConfiguration
in interfaceBuildDefinition
- Specified by:
getDockerPipelineConfiguration
in interfacePartialBuildDefinition
-
setDockerPipelineConfiguration
public void setDockerPipelineConfiguration(@NotNull @NotNull DockerPipelineConfiguration dockerPipelineConfiguration)
Description copied from interface:BuildDefinition
Replace Docker pipeline configuration for this buildable with a different one.- Specified by:
setDockerPipelineConfiguration
in interfaceBuildDefinition
-
isMerged
public boolean isMerged()
- Specified by:
isMerged
in interfacePartialBuildDefinition
- Returns:
- true if the configuration has been merged from multiple sources. Such configurations cannot be saved.
-
setMerged
public void setMerged(boolean value)
Description copied from interface:BuildDefinition
Set whether or not this BuildDefinition has been merged from multiple sources. Merged definitions will not be persisted.- Specified by:
setMerged
in interfaceBuildDefinition
- Parameters:
value
- true if merged
-
isValidValue
public boolean isValidValue(@Nullable @Nullable Object validValue)
Description copied from interface:BuildDefinition
Whether or not a given object is a valid value for this BuildDefinition. For example, PartialBuildDefintions accept nulls.- Specified by:
isValidValue
in interfaceBuildDefinition
- Returns:
-
-