Coder Social home page Coder Social logo

github-jenkins's Introduction

GitHub-Jenkins

This is a project to bridge GitHub and Jenkins to provide support for automatically building Pull Requests in a similar fashion to Travis-CI.

License

GitHub-Jenkins is available under the terms of the 3-clause BSD license.

Work required

GitHub-Jenkins was mostly written in a weekend to solve an immediate problem. As soon as it was ready to fulfil my needs I stopped working on it to focus on other work.

It is currently in a less-than-ideal state with no tests and is slightly fragile in some areas. Configuration is not straightforward and there is no documentation. If there is interest in this project, I will try to rectify that.

Getting Started

In the absence of real documentation, here is the quick and dirty getting-started guide.

Configuration

GitHub-Jenkins is largely configured through the Django admin pages, with some small amount of initial required configuration in the github_jenkins/local_settings.py file, which is used for site-specific (private) configuration, and is not versioned in the git repository.

Site-specific settings

An example of the configuration can be found in the github_jenkins/local_sessing.example.py file. Required information is the GITHUB_APP_ID and the GITHUB_API_SECRET, which must correspond to an application registered in a GitHub account at https://github.com/settings/applications.

Application configuration

It is recommended that a new GitHub account is created for GitHub-Jenkins to authenticate for automated building and status updates. It is currently an inconvenient process to configure this user in GitHub-Jenkins.

  1. Add the GitHub user to GitHub-Jenkins
    1. Using a browser in private-browsing mode, connect to the local GitHub-Jenkins instance in a web browser and log in as the GitHub-Jenkins user. This will add the user to the django database.
    2. Edit the URL to point to the following (which will configure webhooks): /github-jenkins/add_hook/<owner>/<project>/
  2. Configure GitHub-Jenkins

    1. Log in to the django-admin site
    2. Add a Jenkins Job, entering the base location of Jenkins, the job name and user credentials.

    3. Add a (GitHub) Project, entering the owner (github user, e.g. sjagoe) and project name (e.g. github-jenkins). Select the corresponding GitHub authentication user and the Jenkins job to use for building.

Jenkins Job Configuration

The Jenkins Job must be a parameterized job that accepts the following parameters:

  • GIT_BASE_REPO: <missing description>
  • GIT_HEAD_REPO: <missing description>
  • GIT_SHA1: <missing description>
  • GITHUB_URL: <missing description>
  • PR_NUMBER: <missing description>

The job must also use the notifications plugin, with a notification endpoint of https://example.com/github-jenkins/notification/jenkins/.

Dependencies

  • django
  • dango-social-auth
  • pygithub
  • requests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.