This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

By enabling global build expiry, you can choose what Job build result data* will be kept for all Plans in your Bamboo system and for how long this data will be kept (e.g. for reporting purposes), before Bamboo automatically deletes it.

* 'Job build result data' refers to all Job builds of any given Plan's build.

If you disable global build expiry, all of your Plan's Job build result data will never be automatically deleted from your Bamboo server. This could lead to a large portion of your Bamboo server's storage space being consumed to store this data.

You can enable/disable build expiry for:

  • all plans (i.e. 'global' as described below). This is generally the easiest way to manage build expiry in Bamboo. Your settings will apply to all Plans that do not have individual build expiry settings.
  • individual plans (see Configuring Expiry of a Plan's Job Build Results). You would generally only do this if there is a specific reason to keep/delete a particular Plan's Job build result data.

You can also delete the results of a Plan build manually — see Deleting the Results of a Plan Build.

On this page:

Enabling and Configuring Global Expiry of Job Build Results

始める前に

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

To enable and configure global expiry of Job build result 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 fields listed below will be displayed.
    (info) 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 Configuring Expiry of a Plan's Job Build Results for details on how to override the global build expiry settings._
    1. 'What should be expired?:' — select:
      • 'Build result' — if you want to delete all build results data (including artifacts and build logs). If you choose this option, the following two options are automatically selected.
      • 'Artifacts' — if you want to selectively delete all user-defined artifacts of Jobs in this Plan but keep all other Job build result data (such as build logs).
      • 'Build Logs' — if you want to selectively delete all build logs of Jobs in this Plan but keep all other Job build result data (such as artifacts).
    2. In the Expiry criteria section, use one of the follow three criteria to determine how much Job build result data to keep, by modifying the 'Expiry period' and 'Minimum builds to keep' fields accordingly:
      (warning) In this section, 'Job build results' could refer to artifacts, build logs or both (depending on what you specified in the previous substep).
      • To keep all Job build results of this Plan up to a certain age,
        (warning) 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 Job build results of this Plan. E.g. specify '24 months' to keep all Job build results for the last two years.
        • In the 'Minimum builds to keep' field, specify '0'.
      • To keep a specified (or minimum) number of Job build results of this Plan,
        • In the 'Expiry period' field, specify '0'.
        • In the 'Minimum builds to keep' field, specify the number of Job build results of this Plan you want to keep. E.g. specify '50' to keep the latest 50 Job build results.
      • To keep all Job build results of this Plan up to a certain age and a minimum number of these Job build results,
        • In the 'Expiry period' field, specify the number of months/weeks/days for which you want to keep your Job build results of this Plan. E.g. specify '24 months' to keep all Job build results for the last two years.
        • In the 'Minimum builds to keep' field, specify the number of Job build results of this Plan you want to keep. E.g. specify '50' to keep the latest 50 Job build results.
          (Hence, even if all Job builds of this Plan are over two years old, the last 50 Job build results will not be deleted.)
    3. If you wish to keep Job build results with particular labels, select the 'Don't expire builds with certain labels' check box. The 'Labels to keep' field will be displayed:
      • In the 'Labels to keep' field, specify any labels which match the labels applied to Job builds you want to keep. (If you want to specify more than one label, use spaces to separate them.) For any label(s) specified, all Job builds of this Plan which have a matching label will never be deleted, regardless of the Minimum builds to keep and Labels to keep settings.

        Please note, builds can either be labelled:

  7. 保存」ボタンをクリックします。

Disabling Global Expiry of Job Build Results

To disable global expiry of Job build result 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.
    (info) 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 Configuring Expiry of a Plan's Job Build Results for details on how to override the global build expiry settings._

Screenshot above: Configuring build expiry

注意

関連トピック

Managing Data and Backups
Configuring Expiry of a Plan's Job Build Results