In our current DEV environment Octopus continuously deploys multiple projects for multiple branches monitored by TeamCity. In addition our System Analysts use the same environment to verify completed work items for one (chosen) branch at a time.
The challenge is that we want to auto-redeploy only the latest successful release from one chosen branch (to keep it current by redeploying it) when deployments from other branches have completed.
At present we have to manually redeploy the version from the branch we want to keep always deployed after other branches have been deployed as a result of TeamCity CI build.
I think I need a trigger to keep latest version of a branch and I looked through the documentation and the closest to my scenario I found is “Overriding the release used for automatic deployments”, however I am still not sure if this is the right path?
Please can you suggest how can I achieve this?
Thanks for getting in touch! If I understand correctly when you deploy a new version of your app it overrides the version that is used by your System Analysts and that’s why you want to re-deploy their version again to make sure they are always testing the version they originally selected. If so, then the only reliable solution I can see is to provide your System Analysts with their own isolated environment.
If that’s not possible then you can create a subscription based on
Deployment Succeeded event which will call out to your custom code that will re-deploy a specific version of the application. That version will be provided to your custom code by System Analysts.
Please, let me know how you go.
yes your understanding is correct the trouble is that our Dev environment is used for multiple purposes due to infrastructure constraints the System Analysts can not have dedicated environment…
Thanks for the pointer - I’ll try to create a subsciption that if I understand correctly will trigger my script via the webhook payload and re-deploy the latest branch version I want, I’ll let you know how I get on - thanks for your help!