Integration between Jenkins and GitHub

Introduction

In Gett all our CI/CD process is based on Jenkins, and our DevOps are comfortable with that.

But lately our developers began using TravisCI. So we needed a solution to make both of them friends.

 

Getting started

 

  1. Precondition : the GitHub user should have admin permissions
  2. In Travis :
    Config Travis to work with the desired repository
  3. Log in into travis with your git user
  4. Click on the settings icon
  5. Turn on build pushes / build pull request in General Settings

 

  1. In Git :
    Configure the webhook to trigger Jenkins by status ( and not by pull request etc’ )

    1. Enter into the desired Repository in Git
    2. Enter into settings Tab

    1. Click on webhooks & services link
    2. Add WebHook
    3. In the webHook check the checkBox : “Status“
    4. Update webhook
  1. In Jenkins:
    Configure the build triggers

    1. Enter into “configure “ mode in the job
    2. Under Build Triggers Check the listed checkboxes as in the attached img :

Note : don’t forget to check the GitHub hooks for build triggering!

That’s how our Jenkins became aware of TravisCI jobs.

Now you’re good to go.

What people are saying about this article

Be the first one to comment.