I’m having trouble getting my step dependencies to work the way I want them to. In this scenario I am using Octopus Deploy to run a SQL agent job, and also to backup/restore a database from my local environment to my AWS environment. Because we run a blue/green like (not exactly) environment I have an input variable to flag my deployment as going to the A environment or the B environment. Because Octopus doesn’t allow me to have multiple choice variables I am relying on the user to correctly enter A or B and nothing else into the variable box before they kick off the deployment. For this reason my very first step checks to see whether the inputted variable is either A or B and nothing else. If this fails all subsequent steps should be cancelled.
After this the deployment kind of splits into two tracks one track is simple as it has a single step running a SQL agent job and waiting for successful completion. The other track includes a backup, upload to S3, download from S3 and restore step. Those are all obviously dependent on each other and run on 2 different roles (one here to backup, one at AWS to restore) hence they cannot all be child steps as child steps run against the same role.
Once both tracks are successful there is a final step to do the cutover. I will try to illustrate this whole scenario, no comments on the awful diagram please
The entire process takes about 7 hours but I about 1.25hrs of that is wasted as step 4 waits for step 2 to complete. Where did I go wrong?