I want to make a deploy on a bamboo using msdeploy.exe.
I configure a command to run msdeploy.exe on an agent and try to run it with an argument:
-verb:sync -source:contentPath="${bamboo.build.working.directory}" -dest:contentPath="Default Web Site/application-name",ComputerName="http://server/MSDeployAgentService",userName=user-name,password=password -verbose
This command works well from my local cmd.
However, on a bamboo I got an error:
Unrecognized argument '"-dest:contentPath="Default'. All arguments must begin with "-" It suggests that treat "Web.." as a second parameter because of an empty space.
I tried few things but without a success:
- Encode with %20
- "Default Web Site/application-name" -> "Default%20Web%20Site/application-name"
Result - Default%20Web%20Site doesn't exist
This works when I were using msbuild.- Escape with ^
- ^"Default Web Site/application-name^"
Result: "Unrecognized argument..."- Using single quotes '
- 'Default Web Site/application-name'
Result: "Unrecognized argument..."
Bamboo documentations says to use: "Argument you want to pass to the command. Arguments with spaces in them must be quoted" However I already quoted my parameter.