Interface BranchMonitoringConfiguration

    • Field Detail

      • PLAN_BRANCHES_MONITORING_ENABLED

        @Deprecated
        static final String PLAN_BRANCHES_MONITORING_ENABLED
        Deprecated.
        since 5.9
        Pre 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.1
        Pre 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
      • REMOVED_BRANCH_CLEANUP_PERIOD_CONFIG_KEY

        static final String REMOVED_BRANCH_CLEANUP_PERIOD_CONFIG_KEY
        See Also:
        Constant Field Values
      • BRANCHES_NOTIFICATION_STRATEGY_CONFIG_KEY

        static final String BRANCHES_NOTIFICATION_STRATEGY_CONFIG_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
      • isPlanBranchCreationEnabled

        @Deprecated
        boolean isPlanBranchCreationEnabled()
        Deprecated.
        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.
        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 in setRemovedBranchCleanUpPeriodInDays(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 through setInactiveBranchCleanUpPeriodInDays(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 through getPlanBranchWorkflow().
        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 use setPlanBranchWorkflow(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
      • setDefaultBranchNotificationStrategy

        void setDefaultBranchNotificationStrategy​(BranchNotificationStrategy branchNotificationStrategy)
      • 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
      • 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