グローバル有効期限の設定

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

グローバル有効期限を使用すると、Bamboo システムからビルドおよび展開成果物を削除する必要があるタイミングを管理することができます。

以下の理由がある場合にこれを実施することを検討することをお勧めします。

  • ビルドおよび展開成果物が大きくなり、システムのストレージを消費する可能性がある場合。使用しなくなった成果物が無期限に保持されると、ディスク容量が不足する可能性があります。
  • 多数のビルドおよび展開によって、Bamboo ユーザー インターフェイスが乱雑になり、パフォーマンスが低下して、Bamboo での作業が遅くなる可能性があります。

See this Atlassian blog post for a discussion of using build expiry and labels.

グローバル有効期限はすべてのビルド プランと展開プロジェクトに適用され、一般的に、Bamboo の成果物の有効期限を管理する最も簡単な方法です。

ただし、以下に注意してください。

A Bamboo administrator can configure global expiry for both build and deployment artifacts as described below. Bamboo has built-in functionality to remove workspaces from remote agents for plans that no longer exist. 

グローバル有効期限の設定

有効期限に達する前に、ビルド結果データをバックアップするようにします。

グローバル有効期限を有効化および設定する方法:

  1. Click the  icon in the Bamboo header and choose Overview.
  2. 左側のナビゲーション パネルにある有効期限(プランの下)をクリックします。
  3. 必要に応じて、展開の有効期限を有効化します。これは元に戻すことができないことに注意してください - Bamboo 5.7 のアップグレード ノートを参照してください。
  4. 編集をクリックします。
  5. Configure global expiry using the following settings:

    Complete build & deployment results...
    All build results data (including artifacts and build logs), and deployment results and release artifacts, are deleted.

    Build and release artifacts
    Only user-defined artifacts are deleted.

    Build and deployment result logs
    Only build logs and deployment result logs are deleted. Note that logs can be excluded from expiry based on size.

    Expire after
    Specifies the age (days, weeks or months) that build and deployment results must reach before they are deleted.
    For example, specify '24 months' to keep results created in the last two years.

    Maximum builds to keep
    Specifies the maximum number of results you want to keep.

    Minimum builds to keep
    Specifies the minimum number of results you want to keep.
    For example, specify '50' to keep the latest 50 build results, even if they are older than the age specified with Expire after.

    Keep builds with the following labels
    Specifies the build labels (not plan labels or job labels) applied to builds for which you want to keep build results, regardless of the Expire after and Minimum builds to keep settings. Note that builds can be labeled either manually or automatically.

    Minimum deployments to keep
    Specifies the minimum number of successful deployments to keep, even if they are older than the age specified with Expire after. The minimum value is 2.

  6. 「スケジュール」の右にあるアイコンをクリックし、有効期限イベントがトリガされるタイミングを設定します。必要に応じて、cron 式を指定することができます。cron 式の作成については、この FAQ を参照してください。
  7. 保存をクリックします。

グローバル有効期限イベントは、ビルドおよび展開結果の有効期限を有効化しているか無効化しているかにかかわらず、定期的(有効期限スケジュールによって決定)に実行されます。このイベントが発生すると、ビルドおよび展開結果は、設定したグローバル設定およびプラン設定に従って、有効期限切れになります。

有効期限の計算

このセクションでは、ビルドまたは展開結果の存在期間を計算し、有効期限が切れるタイミングを判断する方法について説明します。

ビルド結果とすべてのログ

ビルド結果、ビルド ログ、および展開ログの存在期間は、それぞれ単純に作成日から計算されます。

ビルド結果またはログの存在期間が有効期限の期間以上になった場合、有効期限イベントが発生するときに削除されます(ビルド結果またはログが削除されるように設定されていることがぜんtネイです)。

Note that logs can be excluded from expiry based on size.

ビルドおよび展開成果物

ビルドおよび展開成果物の存在期間は以下のように計算されます。

  • そのビルド結果に関連付けられたリリースがない場合、ビルド結果の作成日が使用されます。
  • リリースがあり、ビルド結果が展開されていない場合は、それを参照している最新のリリースの作成日が使用されます。
  • それ以外の場合は、最新の展開の作成日が使用されます。

ビルドまたは展開成果物の存在期間が有効期限の期間以上になった場合、有効期限イベントが発生するときに削除されます(成果物が削除されるように設定されていることが前提です)。

最終更新日 2022 年 6 月 16 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.