Jenkins Git Integration on Ubuntu


In this article, we will install Jenkins on Ubuntu and examine the following items:

  • Developer commit to source code management system.
  • Jenkins job will be notified.
  • Jenkins send pull request to GitHub.

Configuration of Jenkins on Ubuntu

First, we have to add the key and source list to apt. Apply, below two commands in order.

Now we need to update Ubuntu.

We need to install Jenkins now. Be aware it takes some time to install Jenkins.

The default port number for Jenkins is 8080. The below screenshot is the entry page or Dashboard of Jenkins.

2016-03-12_23-18-15

Restart Jenkins with this command: http://localhost:8080/restart

2016-03-12_23-44-52

We need git in our system so we will install it with below command.

Congratulations, Jenkins environment setup has been completed. 🙂

Integrate Jenkins and GitHub

In this tutorial, we will use GitHub as source code repository. We need to install Jenkins GitHub plugin, for more information visit https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin .

Manage Jenkins page, select Manage Plugins on the available tab search box  = github

2016-03-12_23-39-04

2016-03-12_23-40-18

Above figure shows that, GitHub API Plugin have successfully installed to system.

We will configure Jenkins to trigger a build when a file is modified in the GitHub repository.

  • Connect to the Jenkins server again. Click the New Item link in the left navigation.
  • Name your build job, and choose Freestyle project. Click OK.

2016-03-16_22-43-04

  • Copy the URL from your GitHub project.

2016-03-16_22-48-06

  • In order to manage Jenkins, we need to set executable.

2016-03-16_23-42-14

  • Create a new job and name it.

2016-03-17_16-42-58

  • Specify your GitHub project at source code management.

2016-03-17_16-47-56

  • Add credentials  Username / Password

2016-03-17_16-57-49

  • You can change build trigger using below options.

2016-03-17_16-59-55

  • If your job is triggered you should below result. It will finish with SUCCESS! 🙂

2016-03-17_17-15-38

javafx

Database Operations in JavaFX

By Onur Baskirt / Apr 1, 2016 / 56 Comments
Before started this section, please check the first article and learn How to Start JAVAFX! http://www.swtestacademy.com/getting-started-with-javafx/ At first, part of JavaFX tutorial series, we created a sample JavaFX project, designed the draft version of the UI and set up an...
rest assured

REST API Testing with Rest Assured

By Onur Baskirt / Mar 8, 2016 / 32 Comments
Outline In this post, I will explain what is API and API testing, what is the difference between SOAP and REST services, and how to test REST APIs with Rest Assured Library. What is API? API stands for Application Programming...
extentreports

How to Write Effective CSS Locators

By Onur Baskirt / Oct 1, 2017 / 0 Comments
Hi all, in this tutorial, I will describe you how to write effective CSS locators to interrogate web elements for your automation projects. As a rule of thumb, your interrogation strategy should be in below order: First try to use...
extentreports

Selenium-11: Execute JavaScript with JavascriptExecutor

By Onur Baskirt / Jan 27, 2016 / 15 Comments
Outline Sometimes we cannot handle some conditions or problems with Webdriver, web controls don't react well against selenium commands. In this kind of situations, we use Javascript. It is useful for custom synchronizations, hide or show the web elements, change...
javafx

Getting Started with JavaFX

By Onur Baskirt / Mar 25, 2016 / 0 Comments
When I started to work in my current position, one of my task is to do manual operations for campaign products  every week. After the second week, I thought that I have to automate this task using a GUI based...
extentreports

How to Write Smart XPath Locators

By Onur Baskirt / Sep 24, 2017 / 4 Comments
Hi all, in this tutorial, I will describe you how to write smart and non-brittle XPath locators. When we write our test scripts, we generally prefer to use id, name, class, etc. these kinds of locators. However, sometimes we could not...
extentreports

Selenium-1: Quick Start to Automation with Selenium WebDriver & JAVA & JUnit & Maven & IntelliJ

By Onur Baskirt / Sep 8, 2015 / 26 Comments
Outline Selenium Webdriver is the most popular open source web test automation framework across wide range of browsers and platforms. In this tutorial you will learn how to do web test automation with Selenium Webdriver and the related tools. Audience...
page object model

Page Object Model with C#

By Ege Aksoz / Jun 18, 2017 / 8 Comments
In the previous tutorial, we’ve taken the initial steps and entered the world of automated testing. We also wrote our first automated test. From this point on, since we are not just going to write one test, we need to...
extentreports

How to Select a Date From DatePicker Using Selenium

By Onur Baskirt / Aug 13, 2016 / 6 Comments
When you need to automate a airway, hotel, or similar websites you need to deal with Datepickers and some times it is a little bit cumbersome to select a specific date on the Datepicker or calendar.  In this post, I...
extentreports

Selenium Webdriver Performance testing with Jmeter and Selenium Grid

By Ozgur Kaya / Aug 9, 2016 / 2 Comments
In this post, we will complete Selenium Webdriver Performance testing scenario using Jmeter and Selenium Grid. 1- Install Java 7 or later If necessary https://java.com/tr/download/ 2- Download latest Jmeter version 3.0 or higher. http://jmeter.apache.org/download_jmeter.cgi 3- Download Jmeter PluginsManager JAR file and...
By | 2017-01-13T21:33:43+00:00 March 18th, 2016|Continuous Integration, Jenkins|2 Comments

About the Author:

Onur Yazir
Onur YAZIR is a Senior Software Testing & Deployment Engineer 7+ years of experience. He has worked at Huawei, Ericsson, Teknosa as Software Test Engineer. After that, he worked as DevOps Engineer at London-based fintech company EFT Software. Now, he is a DevOps Engineer at Gulf News Dubai Office. You can find detailed information about him on his linked-in page.

2 Comments

  1. Mark Waite September 26, 2016 at 4:29 pm - Reply

    I think you’ll like it better in a multi-platform and multi-version git world if you define the git executable as “git” rather than as “/usr/bin/git”. The /usr/bin/git path does not work well on the default Windows git configurations, while “git” can work well in at least two different Windows configurations.

  2. bandar judi casino April 5, 2017 at 9:59 am - Reply

    Helpful info. Fortunate me I found your web site accidentally, and I
    am surprised why this twist of fate didn’t took place in advance!

    I bookmarked it.

Leave A Comment