Jenkins with Github
In previous topic, we have learned how to setup Jenkins on EC2.
Now lets see how we integrate Jenkins with Github.
Usually Jenkins comes with default plugins which will be used up to some extent.
So,here lets integrate Gihub third party plugin for continuous Integration, Basically Github is used to update , merge and get the latest code from repository among the developers.It means multiple developers will work on the same project and merge the changes continuously without issue.
So, Jenkins should have this Github plugin to pull the code from Github repository, Which has the latest code where all the developers merged once after testing of the code.
We no need to install this GitHub plugin , if you already installed git in your Jenkins.So, Lets install Git Plugin.
Lets see how to install Git plugin
- On Jenkins Home Page , Click on Manage Jenkins
- Select manage Plugins
- Select on "Available" Tab,Filter with "GIT",
- Select checkbox beside Git Plugin: This will install the Git plugin
- Select "Install without restart": Once after install of Git , Machine doesn't restart
- Download Now and Install aftrer restart: Once after install Git, Machine will restart
- Once installation done , you can see the below screen under "installed" tab.
Now Integrate Github plugin with Jenkins job.
Configure a Jenkins Job, For this Click on
New Item-->Enter Item Name (This is jenkins job name)--> Select Freestyle Project -->OK
This will redirect to the below page , where you should enter project details like below.
Have my sample Github project , which have entered here and click save.
Once above step done Goto Jenkins dashboard to see the configured jobs.
Now select "Sample Job" click on build now.
You can see the job progress in the Build History.
Once its done successfully, It will show as above else , it will show as "Red" color.
You can click on #1 and select "Console output" to see the logs of the Jenkins Job
Now Your Jenkins Job is integrated with Github Project.
Also If you have Git Project , select Git option as below
Enter Project details and click on save .
Run the jenkins job once you configured to see the Job status.
No comments:
Post a Comment