We use release pipelines for releasing docker images onto dev/test/production.
For prod stage, we have set a retention of 365 days and we also want to keep the last 10 builds. The main reason is so that we can know what has been been historically released.
We keep noticing that in the case of production, they eventually get deleted and only 1 or 0 release still show given enough days pass. In my opinion this either means retention settings are not working correctly OR I am doing something wrong?
Can you please help? Does anyone have the same issue?
2
Answers
after further investigation, it looks like
Perhaps this is the issue?
How do I update the project retention policy because currently all the settings seem to be greyed out.
Refer to this doc: Set release retention policies
This means that if you need the retention policy of the release stage to take effect, the stage deployment needs to be completed (success or failure).
Otherwise, the release will follow the retention policy set by the stage that has been deployed to set the retention policy of the release.
From the screenshot, the Prod Stage is not run in multiple releases and only the Dev Stage has completed. So it will follow the retention policy settings of the dev stage to retain the release.
To let the Prod stage retention policy take effect, you need to start the Prod stage deployment.