skip to Main Content

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?

enter image description here
enter image description here

Can you please help? Does anyone have the same issue?

2

Answers


  1. Chosen as BEST ANSWER

    after further investigation, it looks like

    • Newer pipelines do apply the pipeline retention policy
    • Older pipelines seems to be using the default Retention policy, even though this setting has been updated many months after pipeline creation.

    Perhaps this is the issue?

    How do I update the project retention policy because currently all the settings seem to be greyed out.

    enter image description here


  2. Refer to this doc: Set release retention policies

    How does ‘minimum releases to keep’ setting work?

    A release will be considered under minimum releases to keep for a stage only when the deployment started on that stage. Both successful and failed deployments are considered. Releases pending approval are not considered.

    How is retention period decided when release is deployed to multiple stages having different retention period?

    Final retention period is decided by considering days to retain settings of all the stages on which release is deployed and taking max days to keep among them.

    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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search