Octo.exe won't deploy to environment when case doesn't match

I have an environment named “SP” because I was doing some convention based build/deploy through TeamCity. Another story, not really all that important.

When it created the release and tries to deploy it with the following command:

.\octo.exe create-release --server http://server/ --apikey SECRET --project “Main Build” --enableservicemessages --version 3.2.2-sp5116 --channel SP --deployto sp --progress

I receive the error:

“Release ‘3.2.2-sp5116’ of project ‘Main Build’ cannot be deployed to environment ‘sp’ 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, b) the name is misspelled, 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.”

If I capitalize the environment name in the command line execution, it deploys just fine.

My simple fix is that I will change the environment names to lowercase so it works, but wanted to raise this to your attention as well.

Hi Luke,

Thanks for reaching out. That parameter is case sensitive and that’s as design. We will include a mention to this in the tool’s built-in docs in the next version or so.


Good to know. Perhaps it would help to make mention in the TeamCity plugin UI as well since that is where I found it. I’m not doing any custom calls to octo.exe so I would never see the documentation related to that.

Hi Luke,

Change of plans! One of our devs took the job of checking if we handle environment names with case sensitivity in other parts of our code, and turns out we were only being case-sensitive in this part of Octo.exe. So it made sense to make it case-insensitive to be consistent with the rest of our codebase.

The PR is in already and it should go out in the next version of Octo.exe

Kudos to you for bringing this up to our eyes and helping this change move forward :slight_smile: