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.