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
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.since 6.1static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDefault pattern for vcs branch names to match, so Bamboo automatically creates a plan branch if enabled.static final intSets the default number a days a plan branch will be deleted because its vcs branch has been deleted.static final intDefault inactivity period, that will be consider to evaluate if a branch is inactive (no commits in vcs branch).static final Stringstatic final Stringstatic final intSets the minimum number a days a a vcs branch will is considered inactive and therefore its plan branch will be deleted.static final intSets the minimum number a days a plan branch will be deleted because its vcs branch has been deleted.static final StringConfig key for obtaining or settingPlanBranchWorkflow.static final StringDeprecated.since 5.9static final Stringstatic final Stringstatic final intDefault 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 TriggerDefinitionDefault trigger for new branches.intReturns 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 PlanBranchWorkflowReturn the type of plan branching workflow.intReturns a number of days the plan branch will be deleted once detected the vcs branch has been removed.booleanReturns if Bamboo is configured to automatically clean up plan branches for branches that are considered inactive.booleanDeprecated.since 6.1, usegetPlanBranchWorkflow()booleanReturns if Bamboo will attempt to create remote issue links in JIRA when it finds an issue key in the branch name.booleanReturns if Bamboo is configured to automatically clean up plan branches if the vcs branch is removed.voidsetBranchTriggeringOption(@NotNull BranchTriggeringOption branchTriggeringOption) voidsetDefaultBranchIntegrationConfiguration(BranchIntegrationConfiguration defaultBranchIntegrationConfiguration) voidsetDefaultBranchNotificationStrategy(BranchNotificationStrategy branchNotificationStrategy) voidsetDefaultTrigger(@Nullable TriggerDefinition triggerDefinition) Set default trigger for new branches.voidsetInactiveBranchCleanUpEnabled(boolean enabled) Sets Bamboo to automatically cleanup plan branches if vcs branch is inactive.voidsetInactiveBranchCleanUpPeriodInDays(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.voidsetMatchingPattern(@NotNull String regularExpression) Sets the reg expression every vcs branch name will match for Bamboo to automatically create a plan branch for it.voidsetPlanBranchCreationEnabled(boolean enabled) Deprecated.since 6.1, usesetPlanBranchWorkflow(PlanBranchWorkflow)voidsetPlanBranchWorkflow(@NotNull PlanBranchWorkflow planBranchWorkflow) Sets the type of plan branching workflow.voidsetRemoteJiraBranchLinkingEnabled(boolean remoteJiraBranchLinkingEnabled) Sets if Bamboo will attempt to create remote issue links in JIRA when it finds an issue key in the branch name.voidsetRemovedBranchCleanUpEnabled(boolean enabled) Sets Bamboo to automatically cleanup plan branches if vcs branch is deleted.voidsetRemovedBranchCleanUpPeriodInDays(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, toConfigurationMethods 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
-