Promote/Deploy MULTIPLE projects from one environ to another

Hi,

I would like to use Octo.exe to synchronize one environment with another in our system. We have over 100 projects that get deployed to an environment. I want to get all the latest ones that have been deployed to Environment A, and deploy them all to Environment B. I have most of a command worked out, but how do I specify All projects? Below is the command I have so far:

Octo promote-release --force --from=Integration --deployto=Integration --updateVariables --excludemachines=SEA-2500-01,SEA-2500-03 --progress --server http://stuff --apiKey API-IDOHAVEAREALKEY

Hi Jeremy,

Thanks for your question and welcome to the forums!

Unfortunately, you can’t specify all projects with the promote-release command. The promote-release command expects one project name to be provided with the --project switch.

There are a few options for what you are trying to accomplish.

One option would be to script this call and use a loop to call the command for each project. You can hard code the project list or use something like octo.exe’s list-projects command to get a list of projects and iterate through that. You can use the Octopus REST API to find the list of projects. If you go this route, you’d want to remove the --progress option as that would wait for the command to finish one deployment before the next one begins.

Another option would be to use the Deploy a Release step built-in to Octopus. In this case, you would have one project that has a step for each of the other projects that should be deployed. You can use a single deployment of that project to trigger deployments in all of the other projects.

Let me know if you have any other questions or need more information on those options.

Best Regards,
Ryan