Wednesday, November 7, 2012

Software Build Automation using Jenkins - Continuous Integration Server

In software development, there are some tasks that are repeatative in nature such as software builds, packaging the deliverable, sending release emails to the stake holders etc. These repeatative tasks can be done by computers to save time. Jenkins, an open source continuous integration server, can be set up and configured to perform these tasks. Of all the tasks software build automation is the task that everybody wants to automate. In this post I'm going to explain software build automation using Jenkins.


Using Jenkins is fairly simple.  What's needed here is to create a Jenkins job and 'configure' it the way we wanted it to behave and use a regular ant target. The actual build logic will be in the build scripts and Jenkins is configured to call the build script. Apart from this, Jenkins can be configured to perform set of pre-build actions and post build actions. Pre build actions include taking an update on the repository, have user key in the build parameters etc. Post build actions are discussed under section 4 below.

Jenkins Features

1. Source Code Management: Jenkins has the built in plugins for subversion and CVS and many more. The source code management section is available under 'configure' section of the Jenkins job where user can key in the path of source in the repository to build and configure the how should the build be triggered. Build can be initiated by a user manually or it can be triggered by check-in (Poll SCM - build is triggered if there is any change committed into the repository).

2. Build Triggers: We can have Jenkins job build after another building another job. This option solves any dependent modules should be built first.

3. This Parameterized Builds: This is extremely useful because while making the build, the user can give inputs to the build such as the build number, name of the build, type of the build such as Developer Integration Test(DIT), Product Assurance Test (PAT), System Integration Test (SIT) etc.

4. Post Build Actions: Jenkins gives options for the users as to what the build has to after the build job. Typically we may want to have Jenkins send  email notifications to people about the status of the build job. There are several post build actions to explore and use whatever is needed by us. Some of the options are Publish Checkstyle analysis results, Publish JUnit test result report, Publish JavaDoc etc

5. Build History and Trends: User can have a look at the build histories, look at the build console and see the trends graphically. Jenkins also indicates the stability of the build visually by representing that with different icons.

6. Manage Jenkins: Jenkins provides options for managing all the jobs such as defining the environment variables which can be used by any Jenkins job, configuring Ant, JDK, Maven, defining Jenkins Web URL etc.

7. Manage People: Jenkins allows to create users who can use Jenkins, Jenkins can be configured to allow only certain people to invoke the build and for rest of the people, it can be configured to just view the jobs. Also there is an option to explore MyViews where user can configure different tabs naming the different types of builds such as daily builds, fortnightly builds, scheduled releases etc.


Visit the following links to explore and use Jenkins in your software project execution and improve the productivity.

Jenkins - Extendible Open Source Continuous Integration Server 
Jenkins Tutorials


No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...