Install Jenkins and configure with mercurial repo for Continous Integration

Today I had to run all the tests of the build on my local system to be sure that the changes I made would not break anything. So I had to configure the CI on my system which we were using till now for the project from stage server. 
Following are the steps I followed to do this:
  1. Download Jenkins
  2. Download Ant
  3. Download Apache Tomcat 7.0
  4. Unwar Jenkins into tomcat webapp folder
  5. Install Ant and add it to the PATH system variable
  6. Ensure you have JAVA_HOME set to point your java installation directory and that you have tools.jar in the JAVA_HOME\lib folder
  7. Start Apache Tomcat from services
  8. Access Jenkins in web browser using link <tomcat url>/jenkins
  9. Now Jenkins will take a while to configure itself and will come up with home page
  10. If you want to configure with CVS or SVN skip to step , for other versioning software like Mercurial go to next step
  11. Click on Manage Jenkins and Manage Plugins
  12. Add the Mercurial Plugin
  13. In case your project depends upon other projects to be build you would need Multiple SCM plugin as well.
  14. Now restart the tomcat
  15. All good to configure the job now.
  16. Create a new job
  17. Specify the project name and any other option you would like to use.
  18. In Source code management select Multiple SCMs
  19. Add SCM->Select Mercurial
    1. Enter repository URL(it could be the path of folder on you file system)
    2. Expand Advanced and give the name of Subdirectory as ./abc (This is required so that Jenkins creates a folder for each project otherwise it will mess up the paths of all projects and thus build.xml)
  20.     Repeat the above two steps for all projects
  21.     Specify the path and target of build.xml file
  22.     Configure post build steps which can be generating JUnit test result reports or sending email to developers.
  23.     All done now you can build the project.
Hope it would help somebody trying to do the same thing.

Comments

Popular posts from this blog

How to solve “svn: Checksum mismatch while updating..” ?

Optimized Database access