文档

​
​

Development

User Acquisition

Monetization

工业

Build Automation

DevOps

Build Automation REST API

Build Automation Editor Package

Open Unity Dashboard

Build Automation

此页面不支持所选语言。
​
​
Build Automation
  • Overview
  • Get started with Build Automation
  • Build Automation Glossary
  • Build configuration
  • Advanced build configuration
  • Run builds
  • Build results
  • Optimize build speed
  • Manage artifact retention rules
  • Manage concurrent builds
  • Sign build artifacts
  • Build Automation integrations
  • Build Automation API
  • Build Automation Editor Package
  • Reference
  1. Unity Build Automation

Manage artifact retention rules

Learn about artifact retention rules that manage build artifacts and control storage costs.
阅读时间3 分钟
最后更新于 2 个月前

Use artifact retention rules to automatically delete artifacts for builds based on age or the number of builds. Deleting build artifacts saves on storage costs.
Unity Build Automation (UBA) evaluates the artifact retention rules during the next scheduled evaluation. UBA evaluates artifact retention rules every hour.
When UBA deletes artifacts based on retention rules, it keeps a record of the build target. This build target provides details such as build statistics, storage size, and configuration. You can view build targets and a summary of the active artifact retention rules in Build History.
You must have the owner permission or the manager permission for the selected project to manage artifact retention rules.
By default, a project has no artifact retention rules configured. This means that UBA retains build artifacts according to the Unity DevOps retention schemas.
To manage artifact retention rules:
  1. In the Unity Dashboard, go to Build Automation > Settings.
  2. Go to Project settings and to Artifact Retention rules.
  3. To delete build artifacts based on the age of a build, enable Time-based rule and set the build age in days. For more information, refer to Time-based rule.
  4. To delete build artifacts based on build count, enable Build count rule and set the maximum number of builds. For more information, refer to Build count rule.
  5. For either retention rule, enable Retain logs to keep build logs when UBA deletes other build artifacts. When enabled, UBA ignores builds with only logs during rule evaluation. For more information, refer to Artifacts and logs.
  6. Select Save to save artifact retention rules.

Time-based rule

Use the time-based artifact retention rule to delete artifacts from builds that are older than a specified number of days. UBA applies this retention rule to builds based on the following criteria:
  • The build isn't a favorite build.
  • The build has a terminal build status of success, failure, canceled, or unknown.
  • The build has artifacts, or the build has only logs and Retain logs is disabled.
When a build matches the criteria, UBA compares the build's completion date with the current date. If the build is older than the specified number of days, UBA deletes its build artifacts. You can specify a minimum age of 1 day and a maximum age of 365 days. Enable Retain logs to keep logs when UBA deletes build artifacts.

Build count rule

Use the build count artifact retention rule to delete build artifacts when the number of builds exceeds a specified limit. UBA counts a build when its terminal build status is success, failure, canceled, or unknown. The build must also match one of the following conditions:
  • The build isn't a favorite build.
  • The build has artifacts.
  • The build has only logs and Retain logs is disabled.
When a build matches the status and conditions, UBA counts the build. If the build count exceeds the specified limit, UBA deletes the build artifacts for the oldest build based on build completion date. You can specify a minimum limit of 1 build and a maximum limit of 1000 builds. Enable Retain logs to keep logs when UBA deletes build artifacts.

Artifacts and logs

Build artifacts include all assets, files, and logs created when UBA builds a project. Build logs provide details on the build process and use less storage space than other artifacts.
If you enable Retain logs for a retention rule, UBA keeps logs when it deletes build artifacts. UBA also ignores builds with logs when it evaluates the retention rule.
If you disable Retain logs for a retention rule, UBA considers builds with logs the same as builds with artifacts. This means UBA deletes build logs with other build artifacts. For example, for the build count retention rule, if you disable Retain logs, UBA counts builds with logs when evaluating the build count.

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Time-based rule

    • Build count rule

    • Artifacts and logs


报告此页面的问题