Continuous integration
How CI works
Local Repository
Remote Repo
CI Server
Compile
Unit Test cases
Regression Test cases
Publish reports
Benefits of CI
Famous tools for CI
In above Jenkins and Hudson are free CI tools.
Jenkins
Installing and running Jenkins
Use following steps to install and run Jenkins on local environment :
java –jar jenkins.war
3. By default Jenkins runs on 8080 port, so open a browser and hit URL as http://localhost:8080
Opening Jenkins in Browser
Configuring Jenkins Plug-ins
Jenkins Configuration Wizard
In order to connect Jenkins with other tools (i.e java, maven etc.) first we need to configure the Jenkins.
a) Set the path of “Java_Home” variable as of System variable. (e.g. C:\Program Files\Java\jdk1.6.0_17)
Jenkins Configuration Wizard - continued
a) Set the path of Git installation directory (e.g. C:\Program Files\Git\bin\git.exe)
a) Set the path of Maven installation directory as of Maven_Home variable ( e.g. E:\maven2\apache-maven-3.0.5-bin\apache-maven-3.0.5)
5. Now “save” the above settings.
Jenkins Build Jobs
Creating Build Jobs
1. Open Jenkins
2. Click on “new Job”
3. Give a Job name and select “build a free style software product” and click on “OK”
4. A Project configuration screen will appear.
5. In Source code management select “Git” (because our source code is in “Git-hub”).
6. Now give the git hub – source code URL.
Creating Build Jobs - continued
7. In Build trigger section we need to tell Jenkins that at what time we want to trigger the building process.
> Select Pol SCM
> Enter @hourly in Schedule section which means we want to trigger the build process at every hour.
8. In Build Section we have to specify in which way we want to do the build process, since we want to use Maven, therefore select “Invoke top level Maven targets “
9. In Maven version give the version of Maven you are using.
10. Set the Goal section of Maven as
“clean package”