Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General cleanup policy for branches & builds #1312

Open
dcoraboeuf opened this issue Jun 24, 2024 · 0 comments
Open

General cleanup policy for branches & builds #1312

dcoraboeuf opened this issue Jun 24, 2024 · 0 comments

Comments

@dcoraboeuf
Copy link
Contributor

dcoraboeuf commented Jun 24, 2024

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
@dcoraboeuf dcoraboeuf added this to the 4.8 milestone Jun 24, 2024
@dcoraboeuf dcoraboeuf added the status:wip Issue being currently worked on label Jun 24, 2024
@dcoraboeuf dcoraboeuf removed the status:wip Issue being currently worked on label Jul 1, 2024
@dcoraboeuf dcoraboeuf removed this from the 4.8 milestone Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant