Search code examples
azure-devopsazure-pipelinesreleaseretention

Conflicting Release Retention Settings Causing Deletion?


We have a step in our release pipeline that causes the release to be retained indefinitely, overriding the project's default pipeline setting to only retain runs for 30 days. If a release got created February 21st and was set to retain indefinitely (see first screenshot), but the exact same build was created again on February 28th but is NOT set to be retained indefinitely (see second screenshot), will that later release get automatically deleted at the project's default 30 day setting? I'm probably mixing release/pipeline/run/build terminology, but that's a part of ADO I don't use or support in my sysadmin role. The general problem we're facing is the unexplained disappearance of releases despite what we think is the correct setting to retain them indefinitely. When we search for the build ID in the release, it says there is no build found. I'm wondering if the project settings and pipeline settings are conflicting with one another. This is not widespread. It only has been experienced (so far) on this one project.

Thank you for any helpful input!

enter image description here

enter image description here


Solution

  • Answer:

    If a release got created February 21st and was set to retain indefinitel, but the exact same build was created again on February 28th but is NOT set to be retained indefinitely, will that later release get automatically deleted at the project's default 30 day setting?

    The answer is yes. If you set a release to be retained indefinitely, neither the retention policy nor the maximum limits are applied. If you don't set a release to be retained indefinitely, it will follow the retetion policy and maximum limits in pipeline and project settings. Whether two releases have the same build dosen't matter.

    I'm wondering if the project settings and pipeline settings are conflicting with one another.

    The highest priority is marking a release to be retained indefinitely, followed by pipeline settings, and finally project settings. In other words, pipeline settings will override project settings, unless the maximum retention policy allowed by the project is exceeded.