Restricting promotion based on version/tags

(davidkeaveny) #1

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.

(Henrik Andersson) #3

Hi David,

Thanks for getting in touch.

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.

I hope that helps.

Thank you and best regards,
Henrik

(davidkeaveny) #4

Hi Henrik,

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?

(Henrik Andersson) #5

Hi David,

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.

I hope that makes sense.

Thank you and best regards,
Henrik

(system) closed #6

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