Fast-track deployment to multiple environments

Hi,

Can you help with the following scenario:

  • I have a Project with a Lifecycle that includes 3 Phases: Test, Staging and Production.
  • This allows releases to be deployed manually to Test, then to Staging, and finally to Production.
  • I now want an automated task to be able to create a Release and deploy it to Test, Staging and Production automatically.

Options I’m wondering about:

1.- Can this be done via the octo.exe command line alone?

This creates a Release and deploys to Test automatically, but no further:
octo.exe create-release [...] -deployto Test

This creates a Release but fails with cannot be deployed to environment ‘Staging’ because the environment is not in the list of environments that this Release can be deployed to., which makes sense:
octo.exe create-release [...] -deployto Test -deployto Staging

2.- Is the only option to use different Channels?

I could create a new Channel for the project that uses a new Lifecycle that’s set to deploy automatically in each Phase. Then I could target that channel with octo.exe [...] -channel=fast-track… I’d rather not have to do this (I’d need to create that channel for many Projects), but is it the only way?

Thanks for your help,
Martin.

Hi Martin,

Thanks for reaching out. Both approaches can be utilized here.

In the case of the first approach, you cannot pass multiple environments to -deployto like that, but you can simple call Octo.exe deploy-release below your create-release command and pass it the name of the next environment you want todeploy to.

octo.exe create-release [...] -deployto Test
octo.exe deploy-release [...] -deployto Staging

Hope that helps,
Dalmiro

Hi Dalmiro,

Thanks for the information. Does that mean that I need to wait for the deployment to Test to complete before I can make the second call? Or I need to block by doing this to make sure they happen in order?

octo.exe create-release [...] -deployto Test -waitfordeployment
octo.exe deploy-release [...] -deployto Staging -waitfordeployment
octo.exe deploy-release [...] -deployto Production

I’m looking for a solution that allows me to create the release and let Octopus take care of deploying across all the environments without any more input from me. Do I need to go for a new Channel, then?

Cheers,
Martin.

HI Martin,

You’ll need to wait for a deployment to finish on the lower phase before promoting it to the next one, yes. You can do so by passsing --waitfordeployment or --progress, which will show wait for the deployment to finish but will also show you the steps progress.

Cheers,
Dalmiro

Notice:

This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.