Question

I am trying to setup a Teamcity web deploy script to deploy to an Azure environment using the WMSvc calling an endpoint with a site query string. Teamcity web deploy breaks when I try to set a query string in my /M: parameter. My command parameters look like this:

/Y /M:%WebDeploy.ComputerName%MSDeploy.axd?site=%system.SPDestination% /U:%WebDeploy.UserName% /P:%WebDeploy.Password% /A:%WebDeploy.AuthType% –allowUntrusted -enableRule:DoNotDeleteRule

I tried to use encoding on the equals sign %96 but this will create a new parameter in the build parameter. Using double percentage signs (%%96) to escape this will remove the build parameter but the encoding won't get decoded to the equals sign.

I tried to place the whole parameter between quotes in multiple ways but this doesn't have the preferred result. Also tried to put the value in between quotes.

'"/M:%WebDeploy.ComputerName%/MSDeploy.axd?site=%system.SPDestination%"'
'/M:%WebDeploy.ComputerName%/MSDeploy.axd?site=%system.SPDestination%'
"/M:%WebDeploy.ComputerName%/MSDeploy.axd?site%system.SPDestination%"
/M:'%WebDeploy.ComputerName%/MSDeploy.axd?site%system.SPDestination%'
/M:'"%WebDeploy.ComputerName%/MSDeploy.axd?site%system.SPDestination%"'

If this is possible what do I need to do to get this to work?

Any help will be much appreciated.

Was it helpful?

Solution

This problem was caused by Teamcity. We used the build configuration for a different project and it worked fine. Something in Teamcity went wrong during the creation of the build configuration for the project. We still don't know what caused it, but it seems that it is a rare situation and probably won't happen again in the future.

OTHER TIPS

I think this will work:

/M:"%WebDeploy.ComputerName%/MSDeploy.axd?site=%system.SPDestination%"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top