I am using SemVer to label my Octopus deployment packages, and have used channel restrictions so that e.g. any package tagged as -beta cannot be deployed to a UAT environment, only -rc tags or untagged packages.
How can I configure it so that -rc tags cannot be promoted from UAT to production? We are using Gitflow, so -rc tags are being added to builds created in the release branch, while untagged builds are created from master.
You can assign each channel its own lifecycle, so you could create a lifecycle that stops at UAT and assign that lifecycle to your channel for -rc tags. Same for your -beta channel.
Will that work for the release packages (i.e. a package without an -rc tag? If I have a lifecycle for UAT that allows -rc tags and no tags, and a lifecycle for Production that only allows no tags, can I deploy my release package to UAT and then promote to Production? Or do I have to create a separate release in Production?
In that scenario I’d suggest you set it up as follows:
Pre-release channel:
-rc tag
Lifecycle with only UAT
Default channel
no tag
Lifecycle with UAT and Prod
This way pre-release packages will only ever be able to be deployed to UAT while release packages has to go through UAT before it can be promoted to Prod. In you’re current setup, you’d have to create a new release as you can’t change the channel of a release once it’s been created.