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 BranchIntegrationConfigurationbranchIntegrationConfigurationprotected BranchMonitoringConfigurationbranchMonitoringConfigurationprotected BranchSpecificConfigurationbranchSpecificConfigurationprotected BooleancleanWorkingDirectoryprotected Map<String,Object>configObjectsprotected FinalHashMap<String,String>customConfigurationprotected DockerPipelineConfigurationdockerPipelineConfigurationprotected LongrepositoryDefiningWorkingDirprotected List<TaskDefinition>taskDefinitionsprotected 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 BranchIntegrationConfigurationgetBranchIntegrationConfiguration()Returns ChainBranch integration strategy settings, including the branch to merge with, and...@NotNull BranchMonitoringConfigurationgetBranchMonitoringConfiguration()Returns the current branch monitoring configuration of a build plan.@NotNull BranchSpecificConfigurationgetBranchSpecificConfiguration()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 DockerPipelineConfigurationgetDockerPipelineConfiguration()Set Docker pipeline configuration for a particular buildable.@NotNull LonggetRepositoryIdDefiningWorkingDir()@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 BooleanisCleanWorkingDirectory()Should the working directory be cleaned after build.booleanisMerged()booleanisValidValue(@Nullable Object validValue)Whether or not a given object is a valid value for this BuildDefinition.voidsetBranchIntegrationConfiguration(@Nullable BranchIntegrationConfiguration branchIntegrationConfiguration)voidsetBranchMonitoringConfiguration(@Nullable BranchMonitoringConfiguration branchMonitoringConfiguration)voidsetBranchSpecificConfiguration(BranchSpecificConfiguration branchSpecificConfiguration)voidsetCleanWorkingDirectory(boolean cleanWorkingDirectory)Set the working directory be cleaned or not cleaned after buildvoidsetConfigObjects(@NotNull Map<String,Object> configObjects)voidsetCustomConfiguration(@NotNull Map<String,String> customConfiguration)A map of String key and String value pairs, representing customvoidsetDockerPipelineConfiguration(@NotNull DockerPipelineConfiguration dockerPipelineConfiguration)Replace Docker pipeline configuration for this buildable with a different one.voidsetMerged(boolean value)Set whether or not this BuildDefinition has been merged from multiple sources.voidsetRepositoryIdDefiningWorkingDir(long repositoryDefiningWorkingDir)voidsetTaskDefinitions(@NotNull List<TaskDefinition> taskConfigs)voidsetTriggerDefinitions(@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:BuildDefinitionDefinitions of all automatic build triggers defined for this build. If this list is empty, Plan is only triggered manually or through dependencies.- Specified by:
getTriggerDefinitionsin interfaceBuildDefinition- Specified by:
getTriggerDefinitionsin interfacePartialBuildDefinition- Returns:
- immutable list of defined triggers
-
setTriggerDefinitions
public void setTriggerDefinitions(@Nullable @Nullable List<TriggerDefinition> triggerDefinitions)Description copied from interface:BuildDefinitionReplace existing list of triggers with a new one. Setting null indicates that triggerDefinitions should be inherited from master chain.- Specified by:
setTriggerDefinitionsin interfaceBuildDefinition- Parameters:
triggerDefinitions-ListofTriggerDefinition
-
getBranchMonitoringConfiguration
@NotNull public @NotNull BranchMonitoringConfiguration getBranchMonitoringConfiguration()
Description copied from interface:BuildDefinitionReturns 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:
getBranchMonitoringConfigurationin interfaceBuildDefinition- Specified by:
getBranchMonitoringConfigurationin interfacePartialBuildDefinition- Returns:
BranchMonitoringConfiguration
-
setBranchMonitoringConfiguration
public void setBranchMonitoringConfiguration(@Nullable @Nullable BranchMonitoringConfiguration branchMonitoringConfiguration)- Specified by:
setBranchMonitoringConfigurationin interfaceBuildDefinition
-
getBranchIntegrationConfiguration
@NotNull public @NotNull BranchIntegrationConfiguration getBranchIntegrationConfiguration()
Description copied from interface:BuildDefinitionReturns ChainBranch integration strategy settings, including the branch to merge with, and... //todo- Specified by:
getBranchIntegrationConfigurationin interfaceBuildDefinition- Specified by:
getBranchIntegrationConfigurationin interfacePartialBuildDefinition- Returns:
- current
BranchIntegrationConfiguration
-
setBranchIntegrationConfiguration
public void setBranchIntegrationConfiguration(@Nullable @Nullable BranchIntegrationConfiguration branchIntegrationConfiguration)- Specified by:
setBranchIntegrationConfigurationin interfaceBuildDefinition
-
getCustomConfiguration
@NotNull public @NotNull Map<String,String> getCustomConfiguration()
Description copied from interface:BuildDefinition/**- Specified by:
getCustomConfigurationin interfaceBuildDefinition- Specified by:
getCustomConfigurationin 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:BuildDefinitionA map of String key and String value pairs, representing custom- Specified by:
setCustomConfigurationin interfaceBuildDefinition- Parameters:
customConfiguration- - can be null
-
getConfigObjects
@NotNull public @NotNull Map<String,Object> getConfigObjects()
Description copied from interface:BuildDefinitionReturns 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:
getConfigObjectsin interfaceBuildDefinition- Specified by:
getConfigObjectsin interfacePartialBuildDefinition- Returns:
- A
Mapwith aStringas a key and an arbitrary objects as the value.
-
setConfigObjects
public void setConfigObjects(@NotNull @NotNull Map<String,Object> configObjects)- Specified by:
setConfigObjectsin interfaceBuildDefinition
-
getTaskDefinitions
@NotNull public @NotNull List<TaskDefinition> getTaskDefinitions()
Description copied from interface:BuildDefinitionAll tasks defined for this build. Contains both regular tasks and finalising tasks.- Specified by:
getTaskDefinitionsin interfaceBuildDefinition- Specified by:
getTaskDefinitionsin interfacePartialBuildDefinition- Returns:
- A
ListofTaskDefinitions
-
setTaskDefinitions
public void setTaskDefinitions(@NotNull @NotNull List<TaskDefinition> taskConfigs)- Specified by:
setTaskDefinitionsin interfaceBuildDefinition
-
isCleanWorkingDirectory
@NotNull public @NotNull Boolean isCleanWorkingDirectory()
Description copied from interface:BuildDefinitionShould the working directory be cleaned after build.- Specified by:
isCleanWorkingDirectoryin interfaceBuildDefinition- Specified by:
isCleanWorkingDirectoryin interfacePartialBuildDefinition- Returns:
- cleanWorkingDirectory
-
setCleanWorkingDirectory
public void setCleanWorkingDirectory(boolean cleanWorkingDirectory)
Description copied from interface:BuildDefinitionSet the working directory be cleaned or not cleaned after build- Specified by:
setCleanWorkingDirectoryin interfaceBuildDefinition
-
getRepositoryIdDefiningWorkingDir
@NotNull public @NotNull Long getRepositoryIdDefiningWorkingDir()
- Specified by:
getRepositoryIdDefiningWorkingDirin interfaceBuildDefinition- Specified by:
getRepositoryIdDefiningWorkingDirin interfacePartialBuildDefinition
-
setRepositoryIdDefiningWorkingDir
public void setRepositoryIdDefiningWorkingDir(long repositoryDefiningWorkingDir)
- Specified by:
setRepositoryIdDefiningWorkingDirin interfaceBuildDefinition
-
getBranchSpecificConfiguration
@NotNull public @NotNull BranchSpecificConfiguration getBranchSpecificConfiguration()
Description copied from interface:BuildDefinitionReturns any configuration that is specific to a branch plan, and not so relevant for a normal plan.- Specified by:
getBranchSpecificConfigurationin interfaceBuildDefinition- Specified by:
getBranchSpecificConfigurationin interfacePartialBuildDefinition- Returns:
-
setBranchSpecificConfiguration
public void setBranchSpecificConfiguration(BranchSpecificConfiguration branchSpecificConfiguration)
- Specified by:
setBranchSpecificConfigurationin interfaceBuildDefinition
-
getDockerPipelineConfiguration
@NotNull public @NotNull DockerPipelineConfiguration getDockerPipelineConfiguration()
Description copied from interface:BuildDefinitionSet Docker pipeline configuration for a particular buildable.- Specified by:
getDockerPipelineConfigurationin interfaceBuildDefinition- Specified by:
getDockerPipelineConfigurationin interfacePartialBuildDefinition
-
setDockerPipelineConfiguration
public void setDockerPipelineConfiguration(@NotNull @NotNull DockerPipelineConfiguration dockerPipelineConfiguration)Description copied from interface:BuildDefinitionReplace Docker pipeline configuration for this buildable with a different one.- Specified by:
setDockerPipelineConfigurationin interfaceBuildDefinition
-
isMerged
public boolean isMerged()
- Specified by:
isMergedin 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:BuildDefinitionSet whether or not this BuildDefinition has been merged from multiple sources. Merged definitions will not be persisted.- Specified by:
setMergedin interfaceBuildDefinition- Parameters:
value- true if merged
-
isValidValue
public boolean isValidValue(@Nullable @Nullable Object validValue)Description copied from interface:BuildDefinitionWhether or not a given object is a valid value for this BuildDefinition. For example, PartialBuildDefintions accept nulls.- Specified by:
isValidValuein interfaceBuildDefinition- Returns:
-
-