drone #2

Supports: trusty

Add to new model

Description

deploys drone.io, docker, and exposes port 80. Additional actions are
available to further enhance the DroneCI service, such as drone-wall a CI
status board for your team to keep an eye on builds. See the readme for
more information.


DRONE CI

Build Status

Drone is a continuous integration platform built on Docker, written in Golang.

This charm will deploy a single Drone CI server to execute builds against your
git repositories hosted by:

  • GitHub
  • GitLab
  • Gogs
  • BitBucket

Drone CI has a flexible job configuration via a single .drone.yml include in
your repository. For more information, see the
upstream documentation

Getting Started with the DroneCI Charm

DroneCI is deployable as a stand alone instance by default, leveraging SQLITE
database, and no external dependnecies.

juju deploy cs:trusty/drone-ci

This charm will pull and configure the latest docker image, install the Drone-CI
binaries, and expose the DroneCI service on port 80.

Using an external MySQL database

Drone is compatible with MySQL and can be configured to leverage a MySQL database
via relation

juju deploy mysql
juju add-relation drone-ci:db mysql:db

Auth providers

Drone requires an Authorization Provider in order to 'activate' itself. Drone
fully integrates with the API's as a consumer leveraging the service you login
from.

Setting up GitHub

Generate Client and Secret

You must register your application with GitHub in order to generate a Client
and Secret. Navigate to your account settings and choose Applications from the
menu, and click Register new application.

Please use /api/auth/github.com as the Authorization callback URL path.

drone-ci github API setup

Once you have your application configured in GitHub, set these API credentials
on the charm

juju set drone github_client=XXX github_secret=XXX github_enabled=true

Config Helper

This is beta, has very little error checking, and may or may not work given the input you feed the script. Please use with caution.

The charm ships with a script to assist in configuring jobs. This is best run
locally

git clone https://github.com/chuckbutler/drone-ci-charm drone
cd drone/scripts
./config -e {{environment}} -r {{repository https clone url}} -c {{charm name}}

You will receive output that is copy/pasteable to both the drone-ci repository
configuration, and the .drone.yaml to be embedded in the git repository.

drone-ci repository helper script drone-ci github API setup

Known Issues / Caveats

Auth Providers

To begin, only GitHub is supported. Each auth provider will land shortly after
the charm has stabilized, or interest in aforementioned provider is raised.

Upstream Release Schedule / Compatibility

Drone also iterates quickly, and has known to break backwords compatibility
between minor revision numbers (if you follow semver) - as v0.3 (deployed by
this charm) is not complaint, or upgradeable from v0.2. The charm authors will
continue watching this scenario, and notify the Juju mailing list should this
happen moving forward - so anyone deploying from the Juju Charm will know what
to expect.

Scaling

Scaling the service with additional docker workers is not currently supported.

Upstream Contact Information

Upstream Documentation


Configuration

drone_sum
(string) Sha256 sum of the drone payload from downloads.drone.io
81a266e9bd6b411490fc757461b877d0c5e71fc66d47ab10a292b32cbe6d35fd
github_client
(string) Github application client id
github_enabled
(boolean) Enable GitHub integration
github_secret
(string) Github application secret
gogs_enabled
(boolean) Enable Gogs integration
gogs_secret
(string) GOGS Application Secret Key
gogs_url
(string) URL of GOGS server