Skip to content

LVPlayground/ci-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LVP Continuous Integration Server

In an effort to make contributing to Las Venturas Playground easier, a continuous build server is available that validates all incoming pull requests.

The server has been written using Node.js, and is designed to be modular and easy to understand, maintain and update.

Installation

In order to install the continuous integration server, clone the repository in the same directory that also has checkouts of the playground and playgroundjs-plugin repositories:

$ mkdir playground && cd playground
$ git clone https://github.com/LVPlayground/playground.git
$ git clone https://github.com/LVPlayground/playgroundjs-plugin.git
$ git clone https://github.com/LVPlayground/ci-server.git
$ git clone https://github.com/LVPlayground/server.git
$ git config --global --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"

These repositories contain the necessary Linux binaries for the basic checks to be executable.

TODO: This doesn't give us the Pawn compiler, necessary to verify that lvp.ppr builds.

Finally, copy config-example.json to config.json and change the settings to your likings. We recommend choosing a secure secret of at least 16 characters in length.

Running the continuous integration server

The server has been designed to work with Node.js 5.5 and beyond. Run the server using the following command:

$ nodejs index.js

In practice, you'll want to run the process in the background, using an isolated user account.

Setting up the server with GitHub

Navigate to your GitHub project's settings and create a new Webhook with the following settings:

  • Payload URL: http://your.server:1234/push
  • Content Type: application/json
  • Secret: The secret value in your configuration file.
  • Events: Only the pull_request event.
  • Active: Yes.

The Webhook console will give you diagnostical output of the CI server. Please file any issues on this repository and we'll look into them.

Additionally, you'll need an account for posting the updates to GitHub that has repo:status access to the repositories the continuous integration will be activated for. The OAuth token, which can be generated in GitHub's settings area, has to be written to the config file.

Request handlers

The continuous integration server respects the following handlers:

  • /build/SHA: Build logs for the build with the given SHA.
  • /build: Overview of the last ten build attempts.
  • /push: Execution point for requests coming from GitHub.
  • /robots.txt: Textual output to prevent indexing.

About

Continuous integration server for Las Venturas Playground

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published