Giter Club home page Giter Club logo

jently's Introduction

Introduction

Jently is a Ruby app that makes it possible for Jenkins to run tests on open pull requests on Github. Jently itself acts as a mediator between Jenkins and Github. It talks to Github to get an open pull request, creates a testing branch and then instructs Jenkins to run tests on this particular branch. After Jenkins has finished testing the branch, Jently collects the result and updates the status of the relevant pull request commit.

Features

  • Jently tests the merged version of a pull request rather than just the feature branch. It takes into account all changes made upstream after a feature branch was created.

  • Jently automatically re-runs tests whenever new commits are added to either the pull request itself or the branch that the pull request needs to be merged into.

  • Jently uses the Github Commit Status API to update the status of the last commit of a pull request. Whenever possible, a status update contains a link to the Jenkins job that was run to ascertain the correct status.

Getting Started

There are 5 small steps involved in getting Jently up and running. These steps assume you have a recent version of Ruby installed and have sufficient access to your Jenkins CI so as to add builds.

Installing the software

Jently requires several Ruby gems to be installed. You can install all of these in one go by running:

gem install jently

Modifying your Jenkins CI

You will need to setup a parameterized Jenkins build for testing pull requests. Jently will instruct Jenkins to use this build for running tests on an open pull request. You can tell Jently about this build by modifying its configuration file. We will look at this configuration file in a later step, but for now let’s focus on setting up the parameterized build.

On the Configure build screen of your job, you’ll want to check the ‘This build is parameterized’ checkbox and add a ‘branch’, ‘repository’, and ‘id’ parameter. The order of the parameters is important. It should look like this:

Further down on the Configure build screen you can specify your Source Code Management settings. Make sure that your branch specifier is set to ‘$branch’ and that your repository url is set to ‘$repository’. It should look like this:

Downloading Jently

You’ll need to clone the Jently repository to your hard drive in order to get started. You can do this by running:

git clone git@github.com:vaneyckt/Jently.git

Modifying the configuration file

A configuration file can be found in the /config directory. There are a few configuration details that you will need to specify before running Jently. The comments in the file should hopefully make it easy to get everything set up right.

Running Jently

Navigate into the Jently folder and run:

ruby jently.rb

If this is your first run, Jently will start by cloning the specified repository into the /repositories directory, and will also create a .yaml file in the /db directory to help keep track of pull requests.

jently's People

Watchers

James Cloos avatar Manpreet Singh avatar

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.