This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

By enabling build expiry, you can choose how much build results data will be kept in your Bamboo system, and for how long it will be kept (e.g. for reporting purposes), before being automatically deleted.
If you disable build expiry, your build results will never be automatically deleted from Bamboo.

You can enable/disable build expiry for:

  • all plans (as described below) — this is generally the easiest way to manage your build expiry. Your settings will apply to all plans that do not have individual expiry settings.
  • individual plans (see Specifying Expiry for a Plan's Build Results) — you would generally only do this if there is a specific reason to keep/delete a particular plan's build results.

Note that you can also expire build results manually — see Deleting a Build Result.

If you enable build expiry, ensure that you back up your build results data before its expiry date is reached.

On this page:

Enabling Global Build Expiry

To enable expiry for build results data,

  1. Click the 'Administration' link in the top navigation bar.
  2. Click the 'Build Expiry' link in the left navigation column.
  3. The 'Build Expiry' screen will be displayed. Click the 'Enable' button (note, this button will change to 'Edit' when build expiry settings have been added).
  4. The 'Build Expiry Settings' screen will be displayed (see screenshot below).
  5. In the 'Cron Expression' field, specify the cron expression which will govern when the build expiry event will be triggered. For example, specifying 0 0/30 9-19 ? * MON-FRI signifies that the build expiry event will be triggered every half an hour from 9am to 7pm, Monday to Friday. See this FAQ for help constructing cron expressions.
  6. In the 'Global Configuration' section, specify the criteria that will determine what build data is deleted. First, uncheck the 'Disable Global Build Expiry' checkbox to enable build expiry. The following fields will display:

    Please note, that the build expiry event (governed by the previously specified 'Cron Expression') will run regardless of whether you disable or enable build expiry of any data. For example, you may wish to disable build expiry globally, but still schedule a global build expiry event that triggers the deletion of build data from individual plans. See Specifying Expiry for a Plan's Build Results for details on how to override the global build expiry settings.

    • 'What should be expired?:' — select 'Artifacts' if you want to delete all user-defined artifacts but keep all other build results data. Select 'Build result' if you want to delete all build results data (including artifacts).
    • Choose one of these three methods for specifying how much data to keep, using the 'Expiry period' and 'Minimum builds to keep' fields:
      • To keep all build results up to a certain age,
        (warning) Please note, with this method, older plans could have _all their build results deleted._
        • In the 'Expiry period' field, specify the number of months/weeks/days for which you want to keep your build results, e.g. specify '24 months' to keep all build results for the last two years.
        • In the 'Minimum builds to keep' field, specify '0'.
      • To keep a certain number of build results per plan,
        • In the 'Expiry period' field, specify '0'.
        • In the 'Minimum builds to keep' field, specify the number of build results you want to keep, e.g. specify '50' to keep the latest 50 build results for each plan.
      • To keep all build results up to a certain age, and a certain number of build results per plan,
        • In the 'Expiry period' field, specify the number of months/weeks/days for which you want to keep your build results data, e.g. specify '24 months' to keep all build results for the last two years.
        • In the 'Minimum builds to keep' field, specify the number of build results you want to keep, e.g. specify '50' to keep the latest 50 build results for each plan. (This means that, even if all of a plan's builds are over two years old, the last 50 build results will not be deleted.)
    • If you wish to keep builds with particular labels, check the 'Don't expire builds with certain labels' checkbox. The 'Labels to keep' field will display:
      • In the 'Labels to keep' field, specify any labels for which you always want to keep labelled builds. (If you want to specify more than one label, use spaces to separate them.) For any label(s) that you specify, all builds that have a matching label will never be deleted, regardless of which of the three methods you followed for keeping and expiring data above.

        Please note, builds can either be labelled:

  7. Click the 'Save' button.

Screenshot: 'Enable Build Expiry'

Disabling Global Build Expiry

To disable expiry for build results data,

  1. Click the 'Administration' link in the top navigation bar.
  2. Click the 'Build Expiry' link in the left navigation column.
  3. The 'Build Expiry' screen will be displayed (see screenshot below). Check the 'Disable Global Build Expiry' checkbox.

    Please note, that the build expiry event (governed by the previously specified 'Cron Expression') will run regardless of whether you disable or enable build expiry of any data. For example, you may wish to disable build expiry globally, but still schedule a global build expiry event that triggers the deletion of build data from individual plans. See Specifying Expiry for a Plan's Build Results for details on how to override the global build expiry settings.

Screenshot: 'Disable Build Expiry'