Run condition based on tag in release number

Hello. I have been running OctopusDeploy for a few months now and have hit a bit of an issue with managing Windows installer deployments. I have the actual installation and upgrade working but I need a downgrade path as well for rollbacks to previous releases.

A direct run of the previous release doesn’t work due to a newer version of the installed program existing. The process I figured would work is to create a new release with the version like “1.1.1-downgrade” and then make an uninstall step only run when the “-downgrade” is present in the release number.

How do I make the conditional work with something like a “contains” or is there another way to reverse an current release?

Hi Severous,

Thanks for getting in touch,

Based on the information provided in your query it sounds like you could achieve this by utilizing Channels or more specifically including a Version Rules on the Channel itself.

Version rules can be used to assist with selecting the correct versions of packages for the associated Channel.

I’d recommend having a read through the aforementioned documentation for further information.

If I’ve misunderstood your query in any way, or if you require further assistance or clarification, please let me know :slight_smile:

I hope this helps!

Kind Regards,

Reece

Hey Reece,

Unfortunately I can’t do version rules as the package itself is not changed. The scenario is something like this:

version 1.1.1 is released and no issues are found
version 1.1.2 is released but data corrupting issues are found. I need to roll back to version 1.1.1 but I can’t simply redeploy the previous release as it is set to install a version that is no longer newer than the version that currently exists (MSI install).

I think, for now, we will rely on people reverting their code in git, rebuilding the package, and releasing as a new version (1.1.3 for example) but I was hoping for a quicker fix on the deployment side in cases of the “this needs to be done now!” aspect.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.