Is --waitfordeployment parameter (create-release) working?

Hi all,

I’m trying to use “create-release” command with “–waitfordeployment” and use it from Jenkins pipelines. Currently, I’m getting the release correctly created but the response returns and Octopus stills deploying the package.

As far as I read, Octopus command will return until deployment finishes. Is the expected behavior or am I misunderstanding the parameter?

Octo version 4.45.0 Windows.

Command I’m using.

create-release --packageVersion 1.5.0.${env.BUILD_NUMBER} --project \"xxxx xxxxx xxx\" --server http://xxxxxxxxxxxxx --apiKey ${APIKey} --channel \"Deploy To xxxxxxx\" --waitfordeployment

Octo output

Handshaking with Octopus Server: http://xxxxxxxx
Handshake successful. Octopus version: 3.3.11; API version: 3.0.0
Authenticated as: xxxxxxxxxx 
This Octopus Server supports channels
Finding project: xxxxxxxxxx
Building release plan for channel 'Deploy To xxxx'...
Finding deployment process...
Finding release template...
Using version number from package step:
Release plan for xxxxxxx
Channel: 'Deploy To xxxxxxx' (this is the default channel)
  #   Name                          Version    Source           Version rules      
  --- ----------------------------- ---------- ---------------- -------------------
  1   Deploy Application Binaries   User specified   Allow any version  

Creating release...
Release created successfully!


Thanks for getting in touch. The waitfordeployment switch works in conjunction with the deployTo switch, e.g. “please deploy to Development once the release is created and wait for that deployment to complete”.

Do you currently have the channel’s lifecycle configured to automatically deploy to the first environment when a release is available? If so then you would see the deploy happening in Octopus, but octo.exe doesn’t know about it and won’t be waiting for it to complete. In this scenario I’d recommend updating the lifecycle to not automatically deploy and add the deployTo environment to the step in Jenkins.

Hope that helps and if I can assist further just let me know.



The deployTo parameter was the one that I was missing.

As a Documentation improvement would be great to annotate the parameter dependency. Thanks a lot for the help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.