Retention policy - Number of recent runs to retain per pipeline (>= 3). This many runs will also be retained per protected branch and default pipeline branch. (Azure Repos only). Learn more: https://learn.microsoft.com/en-us/azure/devops/pipelines/policies/retention
1. Navigate to Project Settings. 2. Open the Settings link under Pipelines. 3. Set the number of recent runs to keep for each pipeline.
{
"target": "ADOProjectPipelineRetentionSettings",
"if": {
"allOf": [
{
"resource": "ADOProjectPipelineRetentionSettings",
"property": "RetainRunsPerProtectedBranch.Value",
"operator": "greaterThan",
"value": 2
}
]
},
"then": {
"effect": "Audit"
}
}
Copyright © DevOps Shield. All Rights Reserved. Privacy Policy | Cookie Policy | Terms and Conditions