Package com.atlassian.bamboo.plan.branch
Interface BranchMonitoringConfiguration
- All Superinterfaces:
ConvertibleFromConfig
,OptionallyConvertibleFromConfig
,Serializable
- All Known Implementing Classes:
BranchMonitoringConfigurationImpl
public interface BranchMonitoringConfiguration
extends OptionallyConvertibleFromConfig, Serializable
Keeps build plans branches configuration settings.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.since 6.1static final String
static final String
static final String
static final String
static final String
static final String
Default pattern for vcs branch names to match, so Bamboo automatically creates a plan branch if enabled.static final int
Sets the default number a days a plan branch will be deleted because its vcs branch has been deleted.static final int
Default inactivity period, that will be consider to evaluate if a branch is inactive (no commits in vcs branch).static final String
static final String
static final int
Sets the minimum number a days a a vcs branch will is considered inactive and therefore its plan branch will be deleted.static final int
Sets the minimum number a days a plan branch will be deleted because its vcs branch has been deleted.static final String
Config key for obtaining or settingPlanBranchWorkflow
.static final String
Deprecated.since 5.9static final String
static final String
static final int
Default period used for when cleaning of plan branches which vcs branch is removed happens daily, which translates into as soon as the clean up job runs. -
Method Summary
Modifier and TypeMethodDescription@NotNull BranchTriggeringOption
@Nullable TriggerDefinition
Default trigger for new branches.int
Returns a number of days the branch will be consider inactive (as per no commits activity in the repo) and therefore deleted.Returns the reg expression every vcs branch name needs to match for Bamboo to automatically create a plan branch for it.@NotNull PlanBranchWorkflow
Return the type of plan branching workflow.int
Returns a number of days the plan branch will be deleted once detected the vcs branch has been removed.boolean
Returns if Bamboo is configured to automatically clean up plan branches for branches that are considered inactive.boolean
Deprecated.since 6.1, usegetPlanBranchWorkflow()
boolean
Returns if Bamboo will attempt to create remote issue links in JIRA when it finds an issue key in the branch name.boolean
Returns if Bamboo is configured to automatically clean up plan branches if the vcs branch is removed.void
setBranchTriggeringOption
(@NotNull BranchTriggeringOption branchTriggeringOption) void
setDefaultBranchIntegrationConfiguration
(BranchIntegrationConfiguration defaultBranchIntegrationConfiguration) void
setDefaultBranchNotificationStrategy
(BranchNotificationStrategy branchNotificationStrategy) void
setDefaultTrigger
(@Nullable TriggerDefinition triggerDefinition) Set default trigger for new branches.void
setInactiveBranchCleanUpEnabled
(boolean enabled) Sets Bamboo to automatically cleanup plan branches if vcs branch is inactive.void
setInactiveBranchCleanUpPeriodInDays
(int timeOfInactivityInDays) Sets the number of days a plan branch will be consider inactive (as per no commits activity in the repo) and therefore deleted.void
setMatchingPattern
(@NotNull String regularExpression) Sets the reg expression every vcs branch name will match for Bamboo to automatically create a plan branch for it.void
setPlanBranchCreationEnabled
(boolean enabled) Deprecated.since 6.1, usesetPlanBranchWorkflow(PlanBranchWorkflow)
void
setPlanBranchWorkflow
(@NotNull PlanBranchWorkflow planBranchWorkflow) Sets the type of plan branching workflow.void
setRemoteJiraBranchLinkingEnabled
(boolean remoteJiraBranchLinkingEnabled) Sets if Bamboo will attempt to create remote issue links in JIRA when it finds an issue key in the branch name.void
setRemovedBranchCleanUpEnabled
(boolean enabled) Sets Bamboo to automatically cleanup plan branches if vcs branch is deleted.void
setRemovedBranchCleanUpPeriodInDays
(int cleanUpPeriodInDays) Sets the number of days a plan branch will be deleted once detected the vcs branch is removed.Methods inherited from interface com.atlassian.bamboo.fieldvalue.ConvertibleFromConfig
populateFromConfig, toConfiguration
Methods inherited from interface com.atlassian.bamboo.fieldvalue.OptionallyConvertibleFromConfig
isValid
-
Field Details
-
PLAN_BRANCH_WORKFLOW_CFG_KEY
Config key for obtaining or settingPlanBranchWorkflow
. -
PLAN_BRANCHES_MONITORING_ENABLED
Deprecated.since 5.9Pre 5.9, this configuration setting was used to find out if branch monitoring was on. Branch monitoring implied creation and inactivity clean up, if inactive clean up was higher than 0. As part of 5.9 this settings were split up.- See Also:
-
BRANCH_CREATION_CONFIG_KEY
Deprecated.since 6.1Pre 6.1, this configuration setting was used to find out if plan branches should be created if a vcs branch is detected.- See Also:
-
BRANCHES_MATCHING_PATTERN_CONFIG_KEY
- See Also:
-
REMOVED_BRANCH_CLEANUP_CONFIG_KEY
- See Also:
-
REMOVED_BRANCH_CLEANUP_PERIOD_CONFIG_KEY
- See Also:
-
INACTIVE_BRANCH_CLEANUP_CONFIG_KEY
- See Also:
-
BRANCHES_INACTIVITY_CLEAN_UP_PERIOD
- See Also:
-
BRANCHES_NOTIFICATION_STRATEGY_CONFIG_KEY
- See Also:
-
BRANCHES_CUSTOM_CONFIG_KEY
- See Also:
-
JIRA_BRANCH_LINKING_CONFIG_KEY
- See Also:
-
BRANCH_TRIGGERING_CFG_KEY
- See Also:
-
MINIMUM_INACTIVE_BRANCH_CLEAN_UP_PERIOD
static final int MINIMUM_INACTIVE_BRANCH_CLEAN_UP_PERIODSets the minimum number a days a a vcs branch will is considered inactive and therefore its plan branch will be deleted.- See Also:
-
DEFAULT_TIME_OF_INACTIVITY_DAYS
static final int DEFAULT_TIME_OF_INACTIVITY_DAYSDefault inactivity period, that will be consider to evaluate if a branch is inactive (no commits in vcs branch).- See Also:
-
MINIMUM_REMOVED_BRANCH_CLEAN_UP_PERIOD
static final int MINIMUM_REMOVED_BRANCH_CLEAN_UP_PERIODSets the minimum number a days a plan branch will be deleted because its vcs branch has been deleted.- See Also:
-
DEFAULT_REMOVED_BRANCH_CLEAN_UP_PERIOD
static final int DEFAULT_REMOVED_BRANCH_CLEAN_UP_PERIODSets the default number a days a plan branch will be deleted because its vcs branch has been deleted. This is a "sensible minimum value by default" to protect users from an aggressive plan branch deletion strategy.- See Also:
-
REMOVED_BRANCH_DAILY_CLEAN_UP_PERIOD
static final int REMOVED_BRANCH_DAILY_CLEAN_UP_PERIODDefault period used for when cleaning of plan branches which vcs branch is removed happens daily, which translates into as soon as the clean up job runs. This implies the plan branch is removed as soon as the clean up job runs, so it's not kept around longer than that.- See Also:
-
DEFAULT_BRANCH_MATCH_NAME_PATTERN
Default pattern for vcs branch names to match, so Bamboo automatically creates a plan branch if enabled.- See Also:
-
-
Method Details
-
getPlanBranchWorkflow
Return the type of plan branching workflow. The workflow indicates on what changes will Bamboo react when managing plan branches (e.g. VCS branch creation/deletion, pull request creation/deletion).- Since:
- 6.0
-
setPlanBranchWorkflow
Sets the type of plan branching workflow.- Since:
- 6.0
- See Also:
-
isPlanBranchCreationEnabled
Deprecated.since 6.1, usegetPlanBranchWorkflow()
Returns if Bamboo is configured to automatically create plan branches when detecting new branches in the repo.- Since:
- 5.9
-
setPlanBranchCreationEnabled
Deprecated.since 6.1, usesetPlanBranchWorkflow(PlanBranchWorkflow)
Sets Bamboo to automatically create plan branches when detecting new branches in the repo. Existing branches in the repo won't have a build, just the recently created ones.- Parameters:
enabled
- turns on / off this setting- Since:
- 5.9
-
isRemovedBranchCleanUpEnabled
boolean isRemovedBranchCleanUpEnabled()Returns if Bamboo is configured to automatically clean up plan branches if the vcs branch is removed. This will happen X days after the vcs branch been deleted, where X is an user configurable value that can be set insetRemovedBranchCleanUpPeriodInDays(int)
.- Since:
- 5.9
-
setRemovedBranchCleanUpEnabled
void setRemovedBranchCleanUpEnabled(boolean enabled) Sets Bamboo to automatically cleanup plan branches if vcs branch is deleted.- Parameters:
enabled
- turns on / off this setting- Since:
- 5.9
-
isInactiveBranchCleanUpEnabled
boolean isInactiveBranchCleanUpEnabled()Returns if Bamboo is configured to automatically clean up plan branches for branches that are considered inactive. This will happen if the vcs branch does not have commits for X days, where X is an user configurable value that can be set throughsetInactiveBranchCleanUpPeriodInDays(int)
.- Since:
- 5.9
-
setInactiveBranchCleanUpEnabled
void setInactiveBranchCleanUpEnabled(boolean enabled) Sets Bamboo to automatically cleanup plan branches if vcs branch is inactive.- Parameters:
enabled
- turns on / off this setting- Since:
- 5.9
-
getMatchingPattern
String getMatchingPattern()Returns the reg expression every vcs branch name needs to match for Bamboo to automatically create a plan branch for it. This will happen only if branch workflow is enabled, which can be evaluated throughgetPlanBranchWorkflow()
.- Returns:
- regular expression for matching vcs branches
-
setMatchingPattern
Sets the reg expression every vcs branch name will match for Bamboo to automatically create a plan branch for it. Setting this value won't turn automatic branch creation on, for this usesetPlanBranchWorkflow(PlanBranchWorkflow)
.- Parameters:
regularExpression
- regular expression for the vcs branch name to match
-
getInactiveBranchCleanUpPeriodInDays
int getInactiveBranchCleanUpPeriodInDays()Returns a number of days the branch will be consider inactive (as per no commits activity in the repo) and therefore deleted.- Returns:
- number of days a vcs branch is consider to be inactive
-
setInactiveBranchCleanUpPeriodInDays
void setInactiveBranchCleanUpPeriodInDays(int timeOfInactivityInDays) Sets the number of days a plan branch will be consider inactive (as per no commits activity in the repo) and therefore deleted.- Parameters:
timeOfInactivityInDays
- number of days a vcs branch is considered to be inactive
-
getRemovedBranchCleanUpPeriodInDays
int getRemovedBranchCleanUpPeriodInDays()Returns a number of days the plan branch will be deleted once detected the vcs branch has been removed.- Returns:
- number of days a plan branch is considered to be deleted after
- Since:
- 5.9
-
setRemovedBranchCleanUpPeriodInDays
void setRemovedBranchCleanUpPeriodInDays(int cleanUpPeriodInDays) Sets the number of days a plan branch will be deleted once detected the vcs branch is removed.- Parameters:
cleanUpPeriodInDays
- number of days a plan branch is considered to be removed after- Since:
- 5.9
-
getDefaultBranchNotificationStrategy
BranchNotificationStrategy getDefaultBranchNotificationStrategy() -
setDefaultBranchNotificationStrategy
-
getDefaultBranchIntegrationConfiguration
BranchIntegrationConfiguration getDefaultBranchIntegrationConfiguration() -
setDefaultBranchIntegrationConfiguration
void setDefaultBranchIntegrationConfiguration(BranchIntegrationConfiguration defaultBranchIntegrationConfiguration) -
isRemoteJiraBranchLinkingEnabled
boolean isRemoteJiraBranchLinkingEnabled()Returns if Bamboo will attempt to create remote issue links in JIRA when it finds an issue key in the branch name. Bamboo will always create the link from Bamboo to JIRA regardless of this setting.- Returns:
- true if Bamboo should try to create remote issue links in JIRA
-
setRemoteJiraBranchLinkingEnabled
void setRemoteJiraBranchLinkingEnabled(boolean remoteJiraBranchLinkingEnabled) Sets if Bamboo will attempt to create remote issue links in JIRA when it finds an issue key in the branch name. Bamboo will always create the link from Bamboo to JIRA regardless of this setting.- Parameters:
remoteJiraBranchLinkingEnabled
- enables/disables this setting
-
getBranchTriggeringOption
- Since:
- 5.10
-
setBranchTriggeringOption
- Since:
- 5.10
-
getDefaultTrigger
Default trigger for new branches. Has an effect only if branch triggering options is set to 'custom'.- Since:
- 6.6
-
setDefaultTrigger
Set default trigger for new branches. Has an effect only if branch triggering options is set to 'custom'.- Since:
- 6.6
-