Deploying to 2 environments a time not working

Gopi's Avatar


07 Dec, 2017 06:25 PM

when i use the following command in Octopack

Octo.exe deploy-release --server server-url --apiKey apikey --project Portal-Test --version 3.9.83 --deployto DEV --deployto QA --progress

its not working.
Showing the following error:

Release '3.9.83' of project 'PTMD-Portal-Test' cannot be deployed to environment 'QA' because the environment is not in the list of environments that this release can be deployed to. This may be because a) the environment does not exist or is misspelled, b) The lifecycle has not reached this phase, possibly due to previous deployment failure, c) you don't have permission to deploy to this environment, or d) the environment is not in the list of environments defined by the lifecycle.

but when i tried

Octo.exe deploy-release --server server-url --apiKey apikey --project Portal-Test --version 3.9.83 --deployto DEV --progress
Octo.exe deploy-release --server server-url --apiKey apikey --project Portal-Test --version 3.9.83 --deployto QA --progress

Then its working successfully.

What is the reason for it?
The order of environments is DEV, QA.

Even on the project overview if a new release is created. I am not able to deploy it to QA without deploying to DEV.
What are the reasons for it. I want to deploy it to any environment that i want at any time.

My octopus version is: 3.4.13

  1. Support Staff 1 Posted by Reece Walsh on 08 Dec, 2017 03:59 AM

    Reece Walsh's Avatar

    Hi Gopi,

    Thanks for getting in touch,

    It's definitely possible within Octopus to deploy to specific environments without having to re-deploy to all environments that exist prior to the desired environment in the Channel.

    You can accomplish this by creating custom Lifecycles, within the phases of the Lifecycle it's possible to flag an environment as 'optional' which allows the deployment to skip this environment.

    I've included a screenshot below of how this appears when creating the Lifecycle;


    When deploying your release, you can select the specific Environment you wish to deploy to, or you can deploy to all environments.

    I've included a secondary screenshot here that highlights this;


    If applicable, it's also possible to skip specific steps of a deployment via the advanced deployment options after creating a release, you can choose to skip any number of steps from the release for the environment that's currently being deployed to. This is useful in scenarios where only deploying a few steps to an environment is required.

    I've captured how this appears within Octopus below if this helps;


    I hope this helps if you require any further assistance or clarification please do not hesitate to reach out.

    If I've misunderstood in any way, let me know :)

    Have a great day!

    Kind Regards,


  2. 2 Posted by Gopi on 08 Dec, 2017 02:08 PM

    Gopi's Avatar

    Hi Reece,

    The problem is resolved with custom life cycle.
    Thanks a lot for quick reply.

  3. Support Staff 3 Posted by Reece Walsh on 11 Dec, 2017 06:41 AM

    Reece Walsh's Avatar

    Hi Gopi,

    Thank you for getting back to me regarding this,

    It's great to hear you have the solution in-hand utilizing custom lifecycles, I appreciate you taking the time to let me know the outcome.

    If you require any assistance in the future please do not hesitate to reach out :)

    Kind Regards,


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac