Create Single project containing multiple projects

Hi There,

We are using octopus 2.6.3, we have many projects that gets deployed separately.
Now, we need to create a single project call it – “Deploy All” and include all these separate projects into single project.

And, use single click … it will deploy all the included sub-projects.

How can we do this ?

Thanks,
Nikesh

Hi Nikesh,

Thanks for reaching out. You can use Octo.exe with create-release to create and deploy a release on each of the sub-projects http://docs.octopusdeploy.com/display/OD/Creating+releases

Hope that helps

Dalmiro

thanks !!!

Suppose I have 2 projects
ProjectA
ProjectB

how do I use this Octo.exe to create new projectX and call these 2 subprojects ?

Hi Nikesh,

Octo.exe is a tool that allows you to create releases and deploy them in Octopus from the command line. The links I provided on my previous reply show examples of how to do this.

ProjectX (which you’re gonna have to create manually) will only contain a set of Powershell steps that call this cmd line tool, once for each subproject.

Thanks,

Dalmiro

thanks
I setup octo on our octopus server and created the powershell process … on execution I am getting following error

Tentacle script execution
Error 12:00:56
octo : The term ‘octo’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check
Error 12:00:56
the spelling of the name, or if a path was included, verify that the path is correct and try again.

Any idea ?

Hi,

Since you are calling the executable from Powershell, you need to put a “&” before you call the cmd line tool. http://social.technet.microsoft.com/wiki/contents/articles/7703.powershell-running-executables.aspx#The_Call_Operator_amp

& C:\folder\octo.exe create-release --parameter1 --parameter2

Thanks

Dalmmiro

Hi,

Below is the content of my power shell script

& E:\OctopusTools.2.5.4.35\Octo.exe create-release --project Module.Accounts --server http://myserver.com/ --apiKey API-somekey

===========================
error on execution

Running PowerShell script: C:\Users\svcOctopusDeploy\AppData\Local\Tentacle\Temp\3f360213-5e11-4bf4-9e2e-d007eaa58a09.ps1
Error 12:23:00
& : The term ‘E:\OctopusTools.2.5.4.35\Octo.exe’ is not recognized as the name of a cmdlet, function, script file, or
Error 12:23:00
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
Error 12:23:00
again.
Error 12:23:00
At C:\Users\svcOctopusDeploy\AppData\Local\Tentacle\Temp\3f360213-5e11-4bf4-9e2e-d007eaa58a09.ps1:1 char:3
Error 12:23:00

  • & E:\OctopusTools.2.5.4.35\Octo.exe create-release --project Module.Accounts --s …
    Error 12:23:00

Error 12:23:00
+ CategoryInfo : ObjectNotFound: (E:\OctopusTools.2.5.4.35\Octo.exe:String) [], ParentContainsErrorRecord
Error 12:23:00
Exception
Error 12:23:00
+ FullyQualifiedErrorId : CommandNotFoundException
Info 12:23:00

PowerShell exit code: 1

Fatal 12:23:00
PowerShell script returned a non-zero exit code: 1
Tentacle version 2.6.3.886

Hi,

Please see attached an example of a Powershell script step using octo.exe. You’re gonna need to use a couple more parameters like releaseversion,Project, deployto, etc.

Dalmiro

Thanks
I am referring to : http://docs.octopusdeploy.com/display/OD/Creating+releases
octo create-release --project HelloWorld --server http://octopus/ --apiKey API-ABCDEF123456

Also, I don’t see anything different I did from what you sent.
Getting error while running the scripts on the tentacle
Do I need to setup anything on tentacle to make this work ?

Thanks,

Looks like problem is with the tentacle.
How to tentacle knows where is this octo.exe ?

From: Nikesh Jauhari
Sent: Wednesday, August 12, 2015 12:48 PM
To: ‘Dalmiro Grañas’ tender2+da1b995d1c@tenderapp.com
Subject: RE: Create Single project containing multiple projects [Problems #37425]

Thanks
I am referring to : http://docs.octopusdeploy.com/display/OD/Creating+releases
octo create-release --project HelloWorld --server http://octopus/ --apiKey API-ABCDEF123456

Also, I don’t see anything different I did from what you sent.
Getting error while running the scripts on the tentacle
Do I need to setup anything on tentacle to make this work ?

Thanks,

Hi Nikesh,

You don’t need to setup anything special on the Tentacle, you just need to have Octo.exe on a folder on the Tentacle that will be running the command. It knows where Octo.exe is because you are passing the full path when calling the command. In the example below, Octo.exe was downloaded to C:\Tools

& C:\tools\octo.exe create-release --server=http://your-server/ --apikey=YourApiKey #And the rest of the arguments

The example you found in docs.octopusdeploy.com shows a generic path. Its up to the user to modify that part according to their file structure.

Thanks

Dalmiro