Trouble with OctopusDeploy: Release

I have tried to configure OctopusDeploy: Release according to http://octopusdeploy.com/documentation/integration/teamcity but I get this error:

Step 1/1: New build step (OctopusDeploy: Release)
[14:42:09][Step 1/1] Octopus Deploy
[14:42:09][Octopus Deploy] Running command: octo.exe create-release --server=“http://someserver:9999” --apikey=SECRET --project=“My Project” --enableservicemessages --version=“1.0.29.0” --deployto=“Dev” --waitfordeployment
[14:42:09][Octopus Deploy] Creating Octopus Deploy release
[14:42:09][Octopus Deploy] Failed to start build runner ‘octopus.create.release’
[14:42:09]
[Octopus Deploy] java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments
at java.lang.ProcessImpl.isQuoted(Unknown Source)
at java.lang.ProcessImpl.getExecutablePath(Unknown Source)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at octopus.teamcity.agent.OctopusBuildProcess.startOcto(OctopusBuildProcess.java:87)
at octopus.teamcity.agent.OctopusBuildProcess.start(OctopusBuildProcess.java:47)

at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:220)
at java.lang.Thread.run(Unknown Source)
[14:42:09][Octopus Deploy] Step New build step (OctopusDeploy: Release) failed with unexpected error

If I copy the call to octo.exe and run it on the command line then the deployment completes successfully. Has anyone had this problem or know how to fix it?

Thanks,

Liam McLennan.

I did not get the plugin to work. The solution for now was to copy the octo.exe command from the error log and use it in a teamcity command line build step.

Hi Liam,

In your log it says:

--server="http://someserver:9999"

And the error is:

"Executable name has embedded quote, split the arguments"

I’d look at:

  1. Why is that " there? Did you include a quote when you pasted the server URL in? Could you send a screenshot of the build runner configuration?
  2. Is TeamCity or the TC agent installed to a path that uses spaces? Perhaps TC is adding quotes that we didn’t expect.

Paul

The " only appears in the forum after being pasted out of the tc error log. As you can see in the attachment there are no weird characters after the url.

The only slightly unusual feature of the url is that it includes a hyphen.

Thanks for the update Liam, it must be a bug in the plugin, perhaps we need to escape things differently. I’ll try to reproduce and fix in a future release.

Paul

Just to add, we had this issue and it’s definitely that the command fails if the path to the build agent has spaces in it (“Program Files” for example). It seems to be appending the path on the front of the octo.exe call and not escaping it.

Hi,

Has anyone had any luck in resolving this yet? Believe I’ve had this issue since updating TeamCity 7.X to 8.0.3.

Thanks, Ben.

If possible, move your TC build agent from a path with spaces in to one without.

The plugin doesn’t quote the path to octo.exe properly, which is the TC agent directory, so any path with spaces in won’t work when it tries to build the command line call.

Thanks David, that’s resolved the issue for me.