Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 650
Sergejs Avatar asked Mar 07 '13 11:03

Sergejs


People also ask

Can Jenkins be used for .NET applications?

Jenkins itself is written in Java, thus for other project types, you would require consuming those extensions. I will demonstrate usage of the . NET build system in Jenkins workflow to build your . NET apps, as soon as there are changes in the repository.

Which plugin can be used to build a .NET project?

For that, select Manage Jenkins and Click on Manage Plugins. Select the Team Foundation Server Plug-in and VS Team services Continuous Deployment Plugin. Also, we need MS Build Plugin the same as the below screen. From the Source code management tab, will set the source team Foundation Version Control (TFVC).


1 Answers

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

like image 96
Isantipov Avatar answered Sep 24 '22 03:09

Isantipov