Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Wikia/jenkins-webhooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jenkins-webhooks

Flask app for triggering Jenkins builds by GitHub webhooks

DEPRECATION

This solution has been deprecated in favor of github-webhooks-proxy

Links

Installation

  • clone the repository
  • run
virtualenv env
source env/bin/activate
pip install -e .

Unit tests

Can be found in /tests and run via:

py.test

How to run it

The server listens on port 8088 by default

$ ./env/bin/webhooks-server
$ curl -v "http://127.0.0.1:8088/github-webhook/" -d @webhooks/examples/push.json -H "X-GitHub-Event: push" -H "Content-Type: application/json"

Responses

HTTP 201: Jenkins jobs were triggered (the list can be empty if there was no match)

{
  "jobs_started": [
    {
      "params": {
        "repo": "Wikia/app",
        "commit": "4d2ab4e76d0d405d17d1a0f2b8a6071394e3ab40",
        "email": "kyle.daigle@github.com",
        "branch": "wikia-logger-backtrace-for-errors",
        "author": "Kyle Daigle"
      },
      "name": "sparrow_runner"
    }
  ]
}

HTTP 404: Jenkins job specified in config.yaml was not found on Jenkins

{
  "error": "Jenkins job was not found: foo_bar"
}

HTTP 501: internal error

About

Flask app for triggering Jenkins builds by GitHub webhooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published