How can I require an approval when a major or minor version is deployed to an environment the first time?

We have five environments, Dev, Test, UAT, Stage and Production.

We have different lifecycles:

  • Sprint: Dev -> Test
  • Test To Prod: Test -> UAT -> Stage -> Prod
  • UAT to Prod: UAT -> Stage -> Prod
  • Hotfix: Stage -> Prod

When we cut a new release we will either update the major (2020) or minor (1) in our version number, 2020.1.3. When we create a new bug fix release we only update the last number (3).

Our concern is if a release is deployed to Test, UAT or Stage at the wrong time or by accident and it stops our testers. For example, QA is in the middle of testing the 2020.1.3 release in Test. A developer accidentally pushes 2020.2 up to Test. That includes new code QA wasn’t expecting. While QA is in the middle of testing 2020.1.x they only want to see 2020.1.x releases. Due to how our lifecycles overlap channel version rules won’t work.

This answer has been moved over to Stack Overflow: https://stackoverflow.com/questions/60284944/in-octopus-deploy-how-to-require-an-approval-when-a-major-or-minor-version-is-d/60284945#60284945