Giter Site home page Giter Site logo

jakelazaroff / lightspeed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from underscorenygren/lightspeed

0.0 2.0 0.0 38 KB

A simpler CI tool to replace CircleCi or the like.

License: MIT License

Python 62.52% CSS 11.74% HTML 3.30% TypeScript 10.20% JavaScript 12.24%

lightspeed's Introduction

Lightspeed

Lightspeed is a lightweight Continuous Delivery/Integration runner. It's designed as a DIY replacement to services such as CircleCI, Codeship, etc, for people who don't want to give permissive access to the external services or just want more control over what tests to run.

Prerequisites

  • rabbitmq server

Philosophy

Lightspeed brokers messages from github hooks to listners that register with an administration endpoint over HTTP/S. Each listener is configured to match against repo names, branches and files, a and triggers scripts to run in response.

Components

Listeners

Listeners allows you to registered desired behaviour that will be triggered when conditions are met. Configuration is done via json:

{
  "name": "my-repo-with-name", //name substring matches repositories
  "exec": ["python tester.py"], //the commands to run on match
  "cwd": "/some/path", //will run execs in this directory
  "discord_hook": "https://discordapp.com/api/webhooks/someid/more-id", //discord support is experimental
  "discord_notify": "@here"
}

Admin server

The admin servers allows registration of listener hooks, and can be used for administration tasks. It's run separately from the hook endpoint so you can apply different security polices for the two (the admin server shouldn't be exposed to the public internet, since there is no auth yet).

Under the hood, the admin server matches requests with config files, then uses python's subprocess module to run commands and return the output.

Hook server

The hook server is another process that listens on a different port for receive_hook requests from gitub. You can point those hook at it using these instructions

Technically, you can run admin and hook servers on separate machines, but I'd recommend running them locally. The hook server POSTs to the admin server to register a received hook, so it must have access to it.

Running

  • RABBIT_HOST=rabbit python app/admin.py
  • python app/listener.py --host rabbit my-config-file.json
  • python app/hooks.py

lightspeed's People

Contributors

underscorenygren avatar

Watchers

 avatar  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.