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
Fields Modifier and Type Field Description static String
BRANCH_CREATION_CONFIG_KEY
Deprecated.since 6.1static String
BRANCH_TRIGGERING_CFG_KEY
static String
BRANCHES_CUSTOM_CONFIG_KEY
static String
BRANCHES_INACTIVITY_CLEAN_UP_PERIOD
static String
BRANCHES_MATCHING_PATTERN_CONFIG_KEY
static String
BRANCHES_NOTIFICATION_STRATEGY_CONFIG_KEY
static String
DEFAULT_BRANCH_MATCH_NAME_PATTERN
Default pattern for vcs branch names to match, so Bamboo automatically creates a plan branch if enabled.static int
DEFAULT_REMOVED_BRANCH_CLEAN_UP_PERIOD
Sets the default number a days a plan branch will be deleted because its vcs branch has been deleted.static int
DEFAULT_TIME_OF_INACTIVITY_DAYS
Default inactivity period, that will be consider to evaluate if a branch is inactive (no commits in vcs branch).static String
INACTIVE_BRANCH_CLEANUP_CONFIG_KEY
static String
JIRA_BRANCH_LINKING_CONFIG_KEY
static int
MINIMUM_INACTIVE_BRANCH_CLEAN_UP_PERIOD
Sets the minimum number a days a a vcs branch will is considered inactive and therefore its plan branch will be deleted.static int
MINIMUM_REMOVED_BRANCH_CLEAN_UP_PERIOD
Sets the minimum number a days a plan branch will be deleted because its vcs branch has been deleted.static String
PLAN_BRANCH_WORKFLOW_CFG_KEY
Config key for obtaining or settingPlanBranchWorkflow
.static String
PLAN_BRANCHES_MONITORING_ENABLED
Deprecated.since 5.9static String
REMOVED_BRANCH_CLEANUP_CONFIG_KEY
static String
REMOVED_BRANCH_CLEANUP_PERIOD_CONFIG_KEY
static int
REMOVED_BRANCH_DAILY_CLEAN_UP_PERIOD
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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull BranchTriggeringOption
getBranchTriggeringOption()
BranchIntegrationConfiguration
getDefaultBranchIntegrationConfiguration()
BranchNotificationStrategy
getDefaultBranchNotificationStrategy()
@Nullable TriggerDefinition
getDefaultTrigger()
Default trigger for new branches.int
getInactiveBranchCleanUpPeriodInDays()
Returns a number of days the branch will be consider inactive (as per no commits activity in the repo) and therefore deleted.String
getMatchingPattern()
Returns the reg expression every vcs branch name needs to match for Bamboo to automatically create a plan branch for it.@NotNull PlanBranchWorkflow
getPlanBranchWorkflow()
Return the type of plan branching workflow.int
getRemovedBranchCleanUpPeriodInDays()
Returns a number of days the plan branch will be deleted once detected the vcs branch has been removed.boolean
isInactiveBranchCleanUpEnabled()
Returns if Bamboo is configured to automatically clean up plan branches for branches that are considered inactive.boolean
isPlanBranchCreationEnabled()
Deprecated.since 6.1, usegetPlanBranchWorkflow()
boolean
isRemoteJiraBranchLinkingEnabled()
Returns if Bamboo will attempt to create remote issue links in JIRA when it finds an issue key in the branch name.boolean
isRemovedBranchCleanUpEnabled()
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 Detail
-
PLAN_BRANCH_WORKFLOW_CFG_KEY
static final String PLAN_BRANCH_WORKFLOW_CFG_KEY
Config key for obtaining or settingPlanBranchWorkflow
.
-
PLAN_BRANCHES_MONITORING_ENABLED
@Deprecated static final String 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:
- Constant Field Values
-
BRANCH_CREATION_CONFIG_KEY
@Deprecated static final String 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:
- Constant Field Values
-
BRANCHES_MATCHING_PATTERN_CONFIG_KEY
static final String BRANCHES_MATCHING_PATTERN_CONFIG_KEY
- See Also:
- Constant Field Values
-
REMOVED_BRANCH_CLEANUP_CONFIG_KEY
static final String REMOVED_BRANCH_CLEANUP_CONFIG_KEY
- See Also:
- Constant Field Values
-
REMOVED_BRANCH_CLEANUP_PERIOD_CONFIG_KEY
static final String REMOVED_BRANCH_CLEANUP_PERIOD_CONFIG_KEY
- See Also:
- Constant Field Values
-
INACTIVE_BRANCH_CLEANUP_CONFIG_KEY
static final String INACTIVE_BRANCH_CLEANUP_CONFIG_KEY
- See Also:
- Constant Field Values
-
BRANCHES_INACTIVITY_CLEAN_UP_PERIOD
static final String BRANCHES_INACTIVITY_CLEAN_UP_PERIOD
- See Also:
- Constant Field Values
-
BRANCHES_NOTIFICATION_STRATEGY_CONFIG_KEY
static final String BRANCHES_NOTIFICATION_STRATEGY_CONFIG_KEY
- See Also:
- Constant Field Values
-
BRANCHES_CUSTOM_CONFIG_KEY
static final String BRANCHES_CUSTOM_CONFIG_KEY
- See Also:
- Constant Field Values
-
JIRA_BRANCH_LINKING_CONFIG_KEY
static final String JIRA_BRANCH_LINKING_CONFIG_KEY
- See Also:
- Constant Field Values
-
BRANCH_TRIGGERING_CFG_KEY
static final String BRANCH_TRIGGERING_CFG_KEY
- See Also:
- Constant Field Values
-
MINIMUM_INACTIVE_BRANCH_CLEAN_UP_PERIOD
static final int MINIMUM_INACTIVE_BRANCH_CLEAN_UP_PERIOD
Sets the minimum number a days a a vcs branch will is considered inactive and therefore its plan branch will be deleted.- See Also:
- Constant Field Values
-
DEFAULT_TIME_OF_INACTIVITY_DAYS
static final int DEFAULT_TIME_OF_INACTIVITY_DAYS
Default inactivity period, that will be consider to evaluate if a branch is inactive (no commits in vcs branch).- See Also:
- Constant Field Values
-
MINIMUM_REMOVED_BRANCH_CLEAN_UP_PERIOD
static final int MINIMUM_REMOVED_BRANCH_CLEAN_UP_PERIOD
Sets the minimum number a days a plan branch will be deleted because its vcs branch has been deleted.- See Also:
- Constant Field Values
-
DEFAULT_REMOVED_BRANCH_CLEAN_UP_PERIOD
static final int DEFAULT_REMOVED_BRANCH_CLEAN_UP_PERIOD
Sets 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:
- Constant Field Values
-
REMOVED_BRANCH_DAILY_CLEAN_UP_PERIOD
static final int REMOVED_BRANCH_DAILY_CLEAN_UP_PERIOD
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. 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:
- Constant Field Values
-
DEFAULT_BRANCH_MATCH_NAME_PATTERN
static final String DEFAULT_BRANCH_MATCH_NAME_PATTERN
Default pattern for vcs branch names to match, so Bamboo automatically creates a plan branch if enabled.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPlanBranchWorkflow
@NotNull @NotNull PlanBranchWorkflow 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
void setPlanBranchWorkflow(@NotNull @NotNull PlanBranchWorkflow planBranchWorkflow)
Sets the type of plan branching workflow.- Since:
- 6.0
- See Also:
getPlanBranchWorkflow()
-
isPlanBranchCreationEnabled
@Deprecated boolean 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 void setPlanBranchCreationEnabled(boolean enabled)
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
void setMatchingPattern(@NotNull @NotNull String regularExpression)
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
void setDefaultBranchNotificationStrategy(BranchNotificationStrategy branchNotificationStrategy)
-
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
@NotNull @NotNull BranchTriggeringOption getBranchTriggeringOption()
- Since:
- 5.10
-
setBranchTriggeringOption
void setBranchTriggeringOption(@NotNull @NotNull BranchTriggeringOption branchTriggeringOption)
- Since:
- 5.10
-
getDefaultTrigger
@Nullable @Nullable TriggerDefinition getDefaultTrigger()
Default trigger for new branches. Has an effect only if branch triggering options is set to 'custom'.- Since:
- 6.6
-
setDefaultTrigger
void setDefaultTrigger(@Nullable @Nullable TriggerDefinition triggerDefinition)
Set default trigger for new branches. Has an effect only if branch triggering options is set to 'custom'.- Since:
- 6.6
-
-