bergzand / murdock

A simple CI (continuous integration) server written in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CI Coverage

Murdock

A simple continuous integration server written in Python.

Features

  • Highly configurable
  • REST API compatible with OpenAPI
  • Per-repo fine tuning via .murdock.yml
  • Live status of CI jobs via websockets
  • Can comment results on pull-request

And many more not listed here.

Requirements

Murdock is fully written in Python (requires >= 3.9) and is based on the FastAPI framework for the REST API. In order to keep the history of completed jobs, they are stored in a MongoDB database.

We recommend that you use docker-compose to deploy Murdock on a server.

Murdock uses Webhook to interact with GitHub, so we recommend that you read the Github WebHook documentation.

Deployment

A default Docker based deployment can be performed using make:

Build the React application:

$ make

This command will copy the provided .env.example file to a default .env so that it contains good defaults, then clone the murdock-html repository, build the frontend web application and finally launch the Docker services (mongo database, web frontend and Murdock API server). Once deployed, by default, the UI is available at http://localhost:8000.

Development

For local development, we recommend that you use a Python virtualenv.

Install all Murdock dependencies:

$ python3 -m pip install -r requirements.txt

Launch the MongoDB service:

$ docker-compose up mongo-dev

Launch the uvicorn server with the --reload option:

$ uvicorn murdock.main:app --reload --reload-dir murdock

The murdock application can be configured by setting environment variables:

  • to the command line
  • in a .env file (see .env.example for a settings overview)
  • in a .env.local and add ENV_FILE=.env.local to the command line. Again, see the .env.example as example.

The .env files can also be used as-is when deploying with docker-compose using the --env-file <.env filename> option.

To get a complete list of the configuration options, check the Murdock config code.

Testing

Unittests are available and performed using pytest. The full test suite can be launched using Tox:

Install Tox:

$ python3 -m pip install tox

Run the tests:

$ tox

About

A simple CI (continuous integration) server written in Python

License:GNU General Public License v2.0


Languages

Language:Python 93.7%Language:Shell 3.5%Language:Jinja 1.8%Language:Dockerfile 0.8%Language:Makefile 0.2%