Jenkins is an open source continuous integration tool written in Java.Jenkins provides continuous integration services for software development. It is a server-based system running in a servlet container such as Apache Tomcat. It supports SCM tools including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, Clearcase and RTC, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands. [Ref: Wikipedia]
8 Steps to Configure Jenkins to run your project and schedule it
- Download Jenkins (.war file)(https://jenkins-ci.org/) and save it in C:\ drive (better to identify the java).
- Start Jenkins using command in command prompt (java -jar jenkins.war -httpPort=8080)
- Open browser and enter “localhost:8080” to access Jenkins GUI.
- Open Manage Jenkins section to configure the software like JDK, Maven and ANT.
- JDK Installation: Set the name and JAVA_HOME (Uncheck “Install Automatically”).
- Maven Installation: Set the name and MAVEN_HOME (Uncheck “Install Automatically”).
- Configure ANT: Set the name and ANT_HOME (Uncheck “Install Automatically”).
- Create a new project via “New Item” as “Freestyle project”.
- Open project then configure build section and invoke Ant.
- Invoke Ant: Set Ant Version and Targets. Enter targets as “clean compile run generatereport”.
- In Advance section: Set Build File, means set the correct path of the “build.xml” file.
- Click on “Build Now” link to execute the test. Access the running builds from “Build History”. Click on “Console Output” to view the execution progress or status of execution if already done.
- Schedule your build based on Minutes, Hours, Day, Month, and Day of the Week (0-7, where 0 and 7 are Sunday).
- Inside the selected project, click on “Configure” link and goes to “Build Triggers” section; then select “Build periodically” option.
- Enter your schedule in “Schedule” edit field. Example: “H 8 * * *” (this will schedule your build every day at 8h00). If you want to build it in every 5 minutes then mention the schedule as H/5 * * * *
enjoy your Continuous Integration