Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Team City: Skip web.config when deploying using Web Deploy

I deploy a project by using build parameters such as:

systemDeployOnBuild = true

system.DeployIISAppPath = [something]

system.DeployTarget = MSDeployPublish

and a few other parameters to target my IIS Web Deploy server.

How can I prevent the web config from being deployed with it?

Thanks!

like image 787
Base33 Avatar asked Dec 09 '22 18:12

Base33


2 Answers

Define property ExcludeFilesFromDeployment. The value is semicolon separated list of files and wildcards to exclude from deployment.

So for exclusion of web config define ExcludeFilesFromDeployment=Web.config

like image 54
Aleš Roubíček Avatar answered Dec 11 '22 12:12

Aleš Roubíček


Assuming you are using msdeploy via command line you can use -skip parameter as follows:

-skip:objectName=filePath,absolutePath="^.*web\.config$"

In this example I'm using regular expression to exclude all web.configs, but you can also type in relative path to your web.config file.

like image 27
Alexander Manekovskiy Avatar answered Dec 11 '22 10:12

Alexander Manekovskiy