Creating Synchronus Release using Octo.exe in a step template doesn't return step failure

We have created a Project, (I will refer to as Orch from here on in for clarity) that acts as an Orchestrator of other projects. Each step of the Orch project is a poweshell step template that deploys a project using octo.exe. Even though the project called by Orch fails (unrelated to OctopusDeploy) it seems that since the step did what it was supposed to, the step shows as successful. In order to rectify this, we tried using the --waitfordeployment=true switch on the octo.exe command in the step template. The result is that the step doesn’t return a failure, but ultimately times out, which does give the intended result of failing the step if the deployment is unsuccessful. However, we have to wait for the timeout to occur, and do not see the reason WHY the step failed. In contrast, if we use octo.exe directly to call the exact same project, we can see the failure reason, and do not have to wait for the timeout to occur. Any advice on this?

Hi,

Thanks for getting in touch! I would have to test this from my end to give you a proper answer. Could you please send me the powershell code you are using on each step to call Octo.exe?

Thanks!

Dalmiro

Here’s the code inside the step template… We pass in ProjectJName and EnvronmentName to Deploy to

$octo = “c:\utils\OD\Octo.exe”
$project=$OctopusParameters[‘projectName’]
$env=$OctopusParameters[‘Octopus.Environment.Name’]

& “$octo” deploy-release --project=$project --version=latest -waitfordeployment=true --deployto=$env --server=http://devodserver01 --apikey=API-XXXXXXXXXXXXXXXXXXXXXXXXX
write-host “$octo deploy-release -waitfordeployment=true --project=$project --version=latest --deployto=$env --server=http://devodserver01 --apikey=API-XXXXXXXXXXXXXXXXXXX”

Hi ,

Could you pass the parameter –progress to Octo.exe and try again? this should output the deployment log and give us a better glimpse of what is going on.

Thanks!

Dalmiro