Package com.atlassian.bamboo.build
Class DefaultBuildDefinition
java.lang.Object
com.atlassian.bamboo.build.DefaultBuildDefinition
- All Implemented Interfaces:
BuildDefinition
,PartialBuildDefinition
- Direct Known Subclasses:
PartialBuildDefinitionImpl
-
Field Summary
Modifier and TypeFieldDescriptionprotected BranchIntegrationConfiguration
protected BranchMonitoringConfiguration
protected BranchSpecificConfiguration
protected Boolean
protected FinalHashMap<String,
String> protected DockerPipelineConfiguration
protected Long
protected List<TaskDefinition>
protected FinalArrayList<TriggerDefinition>
-
Constructor Summary
ConstructorDescriptionDefaultBuildDefinition
(boolean merged) DefaultBuildDefinition
(@NotNull BuildDefinition other) -
Method Summary
Modifier and TypeMethodDescription@NotNull BranchIntegrationConfiguration
Returns ChainBranch integration strategy settings, including the branch to merge with, and...@NotNull BranchMonitoringConfiguration
Returns the current branch monitoring configuration of a build plan.@NotNull BranchSpecificConfiguration
Returns any configuration that is specific to a branch plan, and not so relevant for a normal plan.Returns a map of objects generated by the plugins./**@NotNull DockerPipelineConfiguration
Set Docker pipeline configuration for a particular buildable.@NotNull Long
@NotNull List<TaskDefinition>
All tasks defined for this build.@Nullable List<TriggerDefinition>
Definitions of all automatic build triggers defined for this build.@NotNull Boolean
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.static BuildDefinition
withTasksCloned
(@NotNull BuildDefinition buildDefinition)
-
Field Details
-
cleanWorkingDirectory
-
branchMonitoringConfiguration
-
branchIntegrationConfiguration
-
branchSpecificConfiguration
-
dockerPipelineConfiguration
-
customConfiguration
-
configObjects
-
taskDefinitions
-
triggerDefinitions
-
repositoryDefiningWorkingDir
-
-
Constructor Details
-
DefaultBuildDefinition
public DefaultBuildDefinition(boolean merged) -
DefaultBuildDefinition
-
-
Method Details
-
withTasksCloned
-
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
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
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
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
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
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
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
- Specified by:
setConfigObjects
in interfaceBuildDefinition
-
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
- Specified by:
setTaskDefinitions
in interfaceBuildDefinition
-
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
- Specified by:
getRepositoryIdDefiningWorkingDir
in interfaceBuildDefinition
- Specified by:
getRepositoryIdDefiningWorkingDir
in interfacePartialBuildDefinition
-
setRepositoryIdDefiningWorkingDir
public void setRepositoryIdDefiningWorkingDir(long repositoryDefiningWorkingDir) - Specified by:
setRepositoryIdDefiningWorkingDir
in interfaceBuildDefinition
-
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
- Specified by:
setBranchSpecificConfiguration
in interfaceBuildDefinition
-
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
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:
-