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:
Following are the steps I followed to do this:
- Download Jenkins
- Download Ant
- Download Apache Tomcat 7.0
- Unwar Jenkins into tomcat webapp folder
- Install Ant and add it to the PATH system variable
- Ensure you have JAVA_HOME set to point your java installation directory and that you have tools.jar in the JAVA_HOME\lib folder
- Start Apache Tomcat from services
- Access Jenkins in web browser using link <tomcat url>/jenkins
- Now Jenkins will take a while to configure itself and will come up with home page
- If you want to configure with CVS or SVN skip to step , for other versioning software like Mercurial go to next step
- Click on Manage Jenkins and Manage Plugins
- Add the Mercurial Plugin
- In case your project depends upon other projects to be build you would need Multiple SCM plugin as well.
- Now restart the tomcat
- All good to configure the job now.
- Create a new job
- Specify the project name and any other option you would like to use.
- In Source code management select Multiple SCMs
- Add SCM->Select Mercurial
- Enter repository URL(it could be the path of folder on you file system)
- 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)
- Repeat the above two steps for all projects
- Specify the path and target of build.xml file
- Configure post build steps which can be generating JUnit test result reports or sending email to developers.
- All done now you can build the project.
Comments
Post a Comment