Sunday 27 May 2018

Jenkins Git Setup

How to setup Jenkins git?

In your Jenkins Dashboard (Home screen), click the Manage Jenkins option on the left hand side.

In the next screen, click on ‘Manage Plugins’ option.


In the next screen, click on Available tab. This tab gives a list of plugins which are available for downloading. In the ‘Filter’ tab type ‘Git plugin’


Installation will then begin and the screen will be refreshed to show the status of the download.


Once all installations are complete, restart Jenkins by issuing below command in the browser.
 http://localhost:8080/jenkins/restart

After restarting Jenkins, Git will be available as an option whilst configuring jobs. 
To verify, click on
New Item in the menu options for Jenkins. Then enter a name for a job, example ‘Demo’. 
Select ‘Freestyle project’ as the item type. 
Click the Ok button.


Make sure that Jenkins is properly setup and Maven project is on GitHub.
Step 1: Configure Jenkins
  1. Insure that GitHub Plugin is installed under- Manage Jenkins > Manage Plugins > Installed search for git. If not installed move to Available Tab and search for git and install it.
  2. Configure JavaGitHub and Maven for Jenkins
  3. Navigate to Manage Jenkins > Global Tool Configuration > Under JDK section provide Name and path to JAVA_HOME, in same way for Git provide Git Name and path to Git executable, same in case of Mavenprovide Name and MAVEN_HOME as in below images


Step 2: Create Job

Create a new Job by clicking New Item
  1. Enter your Job Name ‘Jenkins-GitHub’ and select Maven Project then click OK, You will be navigated to configure the Job.

No comments:

Post a Comment