admin管理员组文章数量:1244215
I'm using Azure DevOps Server 2022.2 (AzureDevopsServer_20240806.7). My pipeline is configured to build and release an ASP.NET Core 8 Web API project which build artifacts and generates 3 GB of files.
We do not have lot of storage so we can't handle more than 50-60 builds. What I want is to preserve the build and release records for a longer period but remove the artifacts after a shorter period.
I have configured the pipeline settings as shown here:
Pipeline -> Settings:
Pipeline -> Release retention:
My question is: even now, when I create a build, it shows the run is going to be kept forever. When viewing the retention lease
. it shows as follows. How do I fix it? Why do the above-configured settings not apply here?
NOTE: Branch policy has no retention-related settings
I'm using Azure DevOps Server 2022.2 (AzureDevopsServer_20240806.7). My pipeline is configured to build and release an ASP.NET Core 8 Web API project which build artifacts and generates 3 GB of files.
We do not have lot of storage so we can't handle more than 50-60 builds. What I want is to preserve the build and release records for a longer period but remove the artifacts after a shorter period.
I have configured the pipeline settings as shown here:
Pipeline -> Settings:
Pipeline -> Release retention:
My question is: even now, when I create a build, it shows the run is going to be kept forever. When viewing the retention lease
. it shows as follows. How do I fix it? Why do the above-configured settings not apply here?
NOTE: Branch policy has no retention-related settings
Share Improve this question edited Feb 17 at 6:03 marc_s 755k184 gold badges1.4k silver badges1.5k bronze badges asked Feb 17 at 6:00 SurenSalukaSurenSaluka 1,5913 gold badges19 silver badges38 bronze badges 1- Consider using devops.stackexchange for devops questions. – tevemadar Commented Feb 17 at 10:00
1 Answer
Reset to default 1Branch policy On branch DEVELOP (forever)
:
It indicates the branch DEVELOP is default branch or protected branch. Any branch policies on branch DEVELOP will make it as protected branch.
Pipeline Retention settings retained by a recent run of this pipeline (forever)
:
It indicates it's the latest run of this branch. Since you set Number of recent runs to retain per pipeline
as 1
, it will keep the latest run for the pipeline's default branch and for each protected branch.
You can create another new build on DEVELOP branch to check the retention on original run again.
Release Management(run artifacts used by release)
:
It indicates the build artifact is consumed by the release pipeline. You have set to only retain 1 release, and Days to keep release after deletion
as 1
day, so if the release run is deleted, you still need to wait for one day till it's permanently deleted.
In addition, the retention policies are processed once a day, after you create new build, you can check the build release lease the next day.
Please check the doc below the details:
In above, you have already set minimum retention policy for both build and release, but need to make sure it's NOT latest build on this branch DEVELOP, and release is permanently deleted after one day.
You can check the doc Set retention policies for builds, releases, and tests for more details.
本文标签: Azure Devops pipeline retention policy issueStack Overflow
版权声明:本文标题:Azure Devops pipeline retention policy issue - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740177655a2236729.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论