HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Azure Dev Ops delete releases not going to production

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
goingdeleteproductiondevazureopsreleasesnot

Problem

I have several release pipelines that build to a UAT environment on a continuous integration. They await deployment to Production on an approval. A new release cancels the previous Production deployment.

Is there a way I can set retention so these deployments that will never be pushed to Production go away? I'd like to still retain the previous production deployments for roll-back purposes.

Solution

The interface is a little vague, but if I go to Pipeline > Edit then click "Retention" at the top, I can set values there that work.

Note: The updates/clean up only happen at... some time??? I'm not 100% sure when, but builds aren't immediately cleaned up if the policy changes.

The Days to Retain a Release box and the Minimum Releases to Keep influence each other, and the system seems to keep the build if either meets the criteria.

So, I set the UAT stage to 1 day / 1 release, so it always keeps AT LEAST 1 build, and always keeps all builds for AT LEAST 1 day.

I set the Prod stage to 3 day / 3 release, so it always keeps AT LEAST 3 builds, and always keeps all builds for AT LEAST 3 days.

Now it's much cleaner:

I hope this helps someone in the future! :)

Context

StackExchange DevOps Q#13378, answer score: 2

Revisions (0)

No revisions yet.