Reputation: 51390
I maintain a couple of GitHub projects which don't have a lot of commit activity, and use Azure Pipelines for CI. A build status badge is displayed in their readme page.
The issue is that by default all builds are cleaned up after 30 days, and the badge then wrongly shows a "never built" status:
I'd like to change my settings so that the last few builds on the master branch are never deleted. Ideally, that should have been the default setting.
The Build and release retention policies docs page suggests that there is a "minimum number of builds" retention setting somewhere, but I couldn't find it anywhere. Not in the organization settings, and neither in the project settings.
_admin/_buildQueue
URL mentioned in the docs redirects to the Parallel jobs settings page which is unrelated to retention policy._settings/settings
page at the project level does not have a minimum number of builds setting.As a workaround, I've set the "Days to keep runs" setting to the maximum value for now, but what I'd really like is to set a small number of latest builds to retain instead. Is there a way to do that or has this option vanished?
Upvotes: 2
Views: 1187
Reputation: 4445
I haven't tested this explicitly in my sandbox org, but I am seeing it in our live org so I think I'm right.
Retaining a minimum number of Build Artifacts is inherited by the Release Pipeline Retention Policy
Retain associated artifacts
This checkbox option is available on an individual stage for a pipeline, or in the default retention policy.
This functionality changed since the Sprint 150 update on April 8. This release was heavy on the Pipelines Areas and a lot of things changed.
There should be a GitHub issue logged with that documentation page, as it is now out-of-data for what it says about build artifacts.
Create a schedule trigger inside the threshold of the retention policy for those builds that don't turn over very often to make sure that you have a run and artifact for your badge to point to.
Upvotes: 2