Drone .drone.yml

Settings

Using MySQL

Builds

Images

指定 image go1.2 相當於指定 bradrydzewski/go:1.2

1
image: go1.2   # same as bradrydzewski/go:1.2

Drone 預設的官方 images

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# these two are base images. all Drone images are built on top of these
# these are BIG (~3GB) so make sure you have a FAST internet connection
docker pull bradrydzewski/ubuntu
docker pull bradrydzewski/base

# clojure images
docker pull bradrydzewski/lein # image: lein

# dart images
docker pull bradrydzewski/dart:stable # image: dart

# erlang images
docker pull bradrydzewski/erlang:R16B # image: erlangR16B
docker pull bradrydzewski/erlang:R16B02 # image: erlangR16B02
docker pull bradrydzewski/erlang:R16B01 # image: erlangR16B01

# gcc images (c/c++)
docker pull bradrydzewski/gcc:4.6 # image: gcc4.6
docker pull bradrydzewski/gcc:4.8 # image: gcc4.8

# go images
docker pull bradrydzewski/go:1.0 # image: go1
docker pull bradrydzewski/go:1.1 # image: go1.1
docker pull bradrydzewski/go:1.2 # image: go1.2
docker pull bradrydzewski/go:1.3 # image: go1.3

# haskell images
docker pull bradrydzewski/haskell:7.4 # image: haskell

# java and jdk images
docker pull bradrydzewski/java:openjdk6 # image: openjdk6
docker pull bradrydzewski/java:openjdk7 # image: openjdk7
docker pull bradrydzewski/java:oraclejdk7 # image: oraclejdk7
docker pull bradrydzewski/java:oraclejdk8 # image: oraclejdk8

# node images
docker pull bradrydzewski/node:0.10 # image node0.10
docker pull bradrydzewski/node:0.8 # image node0.8

# php images
docker pull bradrydzewski/php:5.5 # image: php5.5
docker pull bradrydzewski/php:5.4 # image: php5.4

# python images
docker pull bradrydzewski/python:2.7 # image: python2.7
docker pull bradrydzewski/python:3.2 # image: python3.2
docker pull bradrydzewski/python:3.3 # image: python3.3
docker pull bradrydzewski/python:pypy # image: pypy

# ruby images
docker pull bradrydzewski/ruby:2.0.0 # image: ruby2.0.0
docker pull bradrydzewski/ruby:1.9.3 # image: ruby1.9.3

# scala images
docker pull bradrydzewski/scala:2.10.3 # image: scala2.10.3
docker pull bradrydzewski/scala:2.9.3 # image: scala2.9.3

Environment

Drone 會將 repo clone 到 container 的特定位置去。

1
2
3
/var/cache/drone/src/github.com/$owner/$name
# $ pwd
# /var/cache/drone/src/bitbucket.org/yume190/busstop_advance_as

在撰寫建置腳本(setting up your build commands)或使用 custom Docker Image,請考慮到這點。

Git Command Options

你可以指定 clone 的深度(預設50)

1
2
git:
depth: 1

Deployments

Notifications

Drone 可以觸發 email, hipchat and web hook notification 分別在開始和完成時。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
notify:
email:
recipients:
- brad@drone.io
- burke@drone.io
on_success: change
on_failure: blame
#on_success: false
#on_failure: true

webhook:
on_success: true
on_failure: true
urls:
- http://my-deploy-hook.com

hipchat:
room: support
token: 3028700e5466d375
on_started: true
on_success: true
on_failure: true

Databases

NOTE 1

NOTE 2

Caching

Params Injection