Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use a different setParameters.xml file?

Tags:

msdeploy

So I've got my deploy working on a build and I've set up my build to create a deployment package and execute the package on the target server. Great so far. Now however the application is expanding and I need to have different configurations per machine (account names and such like),

Can I specify what the file name of "setParameters.xml" for example to "Server1.SetParameters.xml" or similar ?

I've got it copying the files over the SetParameters.xml before each deploy for now but is seems in-elegant and should a file get locked for what ever the reason it would deploy the wrong settings to the wrong server.

like image 765
Mark Broadhurst Avatar asked Oct 04 '12 09:10

Mark Broadhurst


1 Answers

Since you are using the WPP-generated deploy.cmd file, the simplest choice is to set %_DeploySetParametersFile% to a full path to your setParmeters file before you execute the deploy script.

SET _DeploySetParametersFile=c:\full\path\to\setParmaeters.xml
call Website.deploy.cmd

Alternatively, if you want to use msdeploy directly, you can specify -setParamFile:c:\full\path\to\setParmaeters.xml. For more information, see Web Deploy Operation Settings

like image 50
Richard Szalay Avatar answered Nov 03 '22 09:11

Richard Szalay