Question about retention policy

Hi,

I was totally fine with retention policy. but there is a little issue about it after using channel.

In our case, we have a default channel dceploying windows service A. and we have another channel deploying windows service A_DEV. Basically, these two channels are deploying codes from two different branches. one is using lifecycle dev-qa-staging-prod and another one is using dev-qa lifecycle

the issue we are facing is octopus only keeps the latest few versions whichever channel it was passed through. since then, if we keep deploying service A_DEV, then all the history deployement folder for service A will be deleted.

what we would like to have is we have different retention policy for this two channels. wondering if you have any solution for this?

Hi,

Thanks for getting in touch! Just to confirm you are talking about the Tentacle retention policies and not the server ones?

For the Tentacle you can add Octopus.Tentacle.CurrentDeployment.RetentionPolicySubset to your project variables and set the value to #{Octopus.Release.Channel.Id}
This will add the channel ID to each release in the deployment journal and distinguish them on the Tentacle so only like will be deleted on each deployment.

Hope this helps!
Vanessa

Hi Vanessa,

Appreciate for quick response.

Cheers,
Ben