3
votes

I have created a CI with bamboo for a MVC Project. Build works fine but the problem is with the deployment using msdeploy. Below is the configuration of the deployment in Bamboo Deployment Configuration

Problem is with the arguments send to msdeploy which looks like this:

-source:package='${bamboo.build.working.directory}\Artifacts\WebDeploy\webdeploy.zip' -dest:auto,computerName="https://my_web_app.cloudapp.net:8172/msdeploy.axd?site=web_app_name",userName="deploy_user_name",password="passowrd",authtype="Basic",includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -allowUntrusted -enableRule:DoNotDeleteRule -setParam:name="IIS Web Application Name",value="web_app_name"

When this code is run in bamboo, i am getting the following error:

Error: Unrecognized argument '"-setParam:name="IIS'. All arguments must begin with "-".

if -setParam:name="IIS Web Application Name",value="web_app_name" is removed from the script deployent is done with success but in a wrong website (virtual directory under Default Web Site)

Any ideas on how this can be fixed without using a separate .bat file? Thanks

1

1 Answers

1
votes

I dealt with a similar issue about a month ago. From everything I've seen, MSDeploy struggles to deal with arguments that have spaces in them. As a result, "IIS Web Application Name" will give you trouble. To overcome this, I excluded this argument and was able to achieve the same goal by including /p:Configuration=DeployIISAppPath="Default Web Site/web_app_name" in the MSBuild command line used to build the deployment package.