Skip to content

General cleanup policy for branches & builds #1312

@dcoraboeuf

Description

@dcoraboeuf

In the settings (in the UI or using Casc), have the possibility to define a global cleanup policy for branches & builds.

The administrator can define a list of "project cleanup polices":

  • a list of regular expressions (includes/excludes) identifying the target projects. If a project is identified by several policies, only the first one is taken into account
  • a list of "branch cleanup policies"

Each branch cleanup policy consists of:

  • a list of regular expressions (includes/excludes) identifying the target branches. If a branch is identified by several policies, only the first one is taken into account. Both the Ontrack branch name (for example: release-1.1) and the display name (typically a Git name like release/1.1) are taken into account by the regular expressions.
  • a cleanup policy among:
    • KEEP - always keep this branch
    • DISABLE - always disable this branch
    • KEEP_LAST - keep the last N branches. N is configurable and branches are ordered by decreasing semantic version
    • KEEP_IF_ACTIVE - keeping the branches if it's been active in the last N days, N being configurable. The last activity of the branch is computed using the creation time of its last build.
    • Other policies can be defined later on using the Ontrack extension mechanism

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions