a blog for those who code

Monday 22 December 2014

Getting started with Jenkins for .Net developers

In this post we will show you how to use Jenkins for Continous Integration in .Net projects. Jenkins is an application that monitors execution of repeated jobs, such as building a software project or jobs run by cron.

PC : http://jenkins-ci.org/

Acording to Martin Fowler
Continous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily-leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a tem to develop cohesive software more rapidly.
This definition gives us the clear picture of Continous Integration. Simply it is an automated process which builds, tests and deploys an application to reduce the developer effort to manually do these tasks. The term Continous does not mean to build your code every minute or every hour, it means that if you do any change in the repository, it should build properly.

Also Read : Create your first job in Jenkins - Part 1Create your first job in Jenkins - Part 2

Importance of Continous Integration :

1. Since you will be doing the testing and integration everytime you check in the code, helps you to create better software by enhancing the chances of catching bugs earlier. It helps you to reduce the risks.

2. Since you have automated the deploy process, thus it will deploy as it should.

3. You will able to know where your build is failing thus helps you to fix the bug sooner rather than later.

Setup Jenkins

Jenkins Wiki has a nice explanation of Installing Jenkins as a Windows Service. You can find it https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service

Plugins Required

To compile .NET and run the tests you need to add few plugins to jenkins. You will get an option to Manage Plugins inside Manage Jenkins. There you can find out the Available or Installed plugins.


MSBuild Plugin : This plugin allows you to use MSBuild to build .NET projects.
Copy Artifact Plugin : Adds a build step to copy artifacts from another project.
Git Plugin : This plugin integrates GIT with jenkins.
Parametrized Trigger plugin : This plugin lets you trigger new builds when your build has completed, with various ways of specifying parameters for the new build.
Promoted Builds (Simple) : Simpler version of Promoted Builds plugin, with only manual promotion of builds.
MSTest Plugin : This plugin converts MSTest TRX test reports into JUnit XML reports so it can be integrated with Jenkins JUint features.
NUint Plugin : This plugin allows you to publish NUint test results.

We would suggest you to go through each and every plugin, and see whether you required them or not. You will get the details of all the .NET development plugins out https://wiki.jenkins-ci.org/display/JENKINS/Plugins#Plugins-.NETdevelopment


In our next post we will show you how to create your first job in jenkins. Please Like and Share the Blog, if you find it interesting and helpful.

No comments:

Post a Comment