Dynamic releases clears other releases


We’re using Octopus to deploy our SaaS-projects.
And recently we started experimenting deployment of projects from command line.

We use powershell to:

  • Create a channel (To keep versions for the different projects) if it does not already exist.
  • Publish a package as web application

The lifecycle is set to keep the latest 3 releases
But even though we are using different channels, the releases are removed, regardless of channel.

Are we missing something? :slight_smile:

Never mind this thread…

All publishes were made to the same channel, but with different release-names (which confused us at work).

When I actually changed the steps to only deploy to the specific channels it worked just fine!

Hi Chris,

Thanks for getting in touch! I am glad you figured out that it was using the same channel, however you may still run into a similar issue with Tentacle retention policies. Our main assumption with channels is that they will be protected from retention policies as they have minimal shared information.
This of course is not 100% true for when you do have dynamic steps with variables and shared paths, packages and versions.

If you do require your Tentacles to have a distinct channel retention policy for your projects (due to shared resources) then you will need to add a project variable Octopus.Tentacle.CurrentDeployment.RetentionPolicySubset and give it a value of #{Octopus.Release.Channel.Id} it will retain the deployed releases for each channel for each setting. If your packages, versions and paths are un-shared you won’t need to add this value.

I just wanted to give you the heads up now that you are using individual channels.