harness-drone/README.md

100 lines
2.1 KiB
Markdown
Raw Normal View History

2015-04-08 23:59:57 +00:00
Highly experimental branch that implements the following features:
2015-04-08 23:59:57 +00:00
* Pluggable database backends
* Pluggable queue
* Matrix builds
* Build plugins
* New Yaml syntax
* and more ...
2014-11-10 08:24:47 +00:00
2015-04-08 23:59:57 +00:00
Running Drone:
2014-11-10 08:24:47 +00:00
```
2015-04-08 23:59:57 +00:00
./drone --config="/path/to/config.toml"
```
2015-04-08 23:59:57 +00:00
Configuring Drone:
```toml
2014-10-11 21:30:51 +00:00
[server]
2015-04-16 22:15:05 +00:00
addr = ":80"
cert = ""
key = ""
2014-10-11 21:30:51 +00:00
[session]
2015-04-16 22:15:05 +00:00
secret = ""
expires = ""
[database]
2015-06-11 12:52:24 +00:00
driver="sqlite3"
datasource="/var/lib/drone/drone.sqlite"
[docker]
2015-04-16 22:15:05 +00:00
cert = ""
key = ""
2015-05-28 17:04:50 +00:00
addr = "unix:///var/run/docker.sock"
swarm = ""
[remote]
2015-05-28 17:04:50 +00:00
kind = "github"
2015-04-08 23:59:57 +00:00
base = "https://github.com"
orgs = []
open = false
2015-05-28 17:04:50 +00:00
private = false
2015-04-08 23:59:57 +00:00
skip_verify = true
2015-05-28 17:04:50 +00:00
[auth]
2015-04-08 23:59:57 +00:00
client = ""
secret = ""
authorize = "https://github.com/login/oauth/authorize"
access_token = "https://github.com/login/oauth/access_token"
request_token = ""
2015-05-19 04:54:10 +00:00
[agents]
secret = ""
```
2015-05-28 17:04:50 +00:00
Configuration settings can also be set by environment variables using the scheme
`DRONE_<section>_<confkey>`, substituting the section title for `<section>` and
the key for `<confkey>`, in all caps. For example:
2015-05-28 17:04:50 +00:00
```shell
#!/bin/bash
# prepare environment for executing drone
DRONE_REMOTE_BASE="https://github.com" # for [remote] section, 'base' setting
2015-05-28 17:04:50 +00:00
DRONE_DOCKER_ADDR="tcp://10.0.0.1:2375" # for [docker] section, 'addr' setting
DRONE_AUTH_CLIENT="0123456789abcdef0123AA" # for [auth] section, 'client' setting
DRONE_AUTH_SECRET="<sha-1 hash secret>" # for [auth] section, 'secret' setting
DRONE_AUTH_ACCESSTOKEN="<url>" # for [auth] section, 'access_token' setting
2015-05-28 17:04:50 +00:00
2015-05-30 05:04:41 +00:00
exec ./drone -config=drone.toml
2015-05-28 17:04:50 +00:00
```
_NOTE: Configuration settings from environment variables override values set in
the TOML file._
2015-05-31 20:36:51 +00:00
### From Source
Commands to build from source:
```sh
make bindata # create .go files for web assets
make # create binary files in ./bin
make test # execute unit tests
```
Commands to run:
```sh
bin/drone
bin/drone --debug # debug mode loads static content from filesystem
```
**NOTE** if you are seeing slow compile times you can try running `go install`
for the vendored `go-sqlite3` library:
2015-05-31 20:36:51 +00:00
```sh
go install github.com/drone/drone/Godeps/_workspace/src/github.com/mattn/go-sqlite3
```