Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trigger only web.config transformations via batch command in Jenkins

I am setting up a Jenkins server to build .NET projects. We our using the visual studio Web.config transformations to transform our config files for each environment (Dev1, Dev2, QA, and Release). I am using the following command line arguments in my MSBuild command, and it is working with the transformations:

/p:Configuration=Dev1;DeployOnBuild=true;DeployTarget=Package;_PackageTempDir=..\..\deploy\current\Dev1

The problem is that I have to rebuild the solution for each environment, and some of the solutions are quite large and take a some time to build. I would like to only build the solution once, and then trigger just the transformations for the other environments. Does anyone know of a way to do this through an MSBuild batch command, or another way to get this done in Jenkins?

like image 734
Mike Pennington Avatar asked Mar 21 '12 21:03

Mike Pennington


1 Answers

I ended up using this Config Transform Tool on CodePlex. It did the trick easily by allowing us to run web.config transforms from a command line script that is easily executed by a Jenkins build step.

like image 149
Mike Pennington Avatar answered Oct 06 '22 18:10

Mike Pennington