We have the following setup:
- Configured AWS Auto Scalling groups and a newly created instances register in the Octopus automatically
- Automatic deployment for newly created instances with Deployments->Triggers
- 2 Channels in our project. Let’s call it “simple”, and “extended” which has some additional steps
Developers usually deploy with “simple” channel, but let’s assume:
A developer deploys a package with “extended” channel selected. Then we terminate an instance or extend our Auto Scalling group, so that a new instance is created, registered in the Octopus and a package is auto-deployed. But, the package is deployed with “extended” channel (because it was last used) and additional steps are executed. We would like to auto-deploy newly created instances always using “simple” channel to avoid running additional steps from “extended” channel. How can we obtain that? Any help will be appreciated.
Potential solutions I was thinking about:
- Add a step that fails at the end of “extended” channel process, so that the “simple” channel will be triggered to auto-deploy, but that way the latest version from “simple” channel is deployed, not the latest from both channels.
- Create a new project for auto-deployment which will have the steps from “simple” channel only. But not sure how to point the auto-deployment project which version to use - in other words - which version is the latest from the main project. Also which step template to use here (“Deploy Child Octopus Deploy Project” / “Chain Deployment” / “Deploy a Release”)
- Trigger deploy with “simple” channel always when the “extended” channel finishes.
Additionally, we have several environments and several target roles are used during the deployment.
Thank you for any replies.