What Jenkins plugin can be used for .NET web site deployment?

Sergejs picture Sergejs · Mar 7, 2013 · Viewed 11.5k times · Source

We use: - SVN - Jenkins - MS Build plugin

We have several Web Form/MVC/Web services.

We are going to setup Microsoft Web Deploy and run bat file from Jenkins.

Maybe someone can suggest better way to do that or this looks like most effective solution?

Thank you in advance.

Answer

Isantipov picture Isantipov · Mar 10, 2013

WebDeploy is definetly the right way to deploy web applications.

Staring from VS2010 targets for running web deploy in simple scenarious are "built-in" into the project files(and msbuild extension files on the PC). Starting from VS2012 you can also use Publish Profiles feature which allows storing publish details in a simple file. E.g. you can run something like that:

msbuild MyProject.csproj /p:DeployOnBuild=true /p:PublishProfile=<profile-name> /p:Password=<insert-password> /p:VisualStudioVersion=11.0

Which will build the app and publish it using the profile-name publish profile.

  • Have a look at this article's "Creating a Publish Profile" section to know more about creating Publish profiles.
  • Have a look at this post by Sayed Ibrahim Hashimi for reference on publish automation with VS 2012.
  • There's also a good series of blog posts on automating deployments with TeamCity by Troy Hunt (he uses vs2010, so this might be helpful if you are using VS2010)

We were using bat files to run webdeploy commands directly when we were restricted to .NET 3.5 and VS2008 which didn't have project files web deploy integration.

Hope it helps,

Ivan