This repository has been archived by the owner on Dec 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
81 lines (71 loc) · 2.41 KB
/
.drone.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
platform: linux/arm
workspace:
base: /go
path: src/github.com/armswarm/drone
clone:
git:
image: quay.io/armswarm/drone-git
pipeline:
fetch_upstream:
image: quay.io/armswarm/golang:1.9-alpine
environment:
- VERSION=v0.8.4
commands:
- echo "$${VERSION}"
- go get -d github.com/drone/drone/...
- cd $GOPATH/src/github.com/drone/drone
- git checkout "$${VERSION}"
test:
image: quay.io/armswarm/golang:1.9-alpine
commands:
- go get -u github.com/drone/drone-ui/dist
- go get -u golang.org/x/tools/cmd/cover
- go get -u golang.org/x/net/context
- go get -u golang.org/x/net/context/ctxhttp
- go get -u github.com/golang/protobuf/proto
- go get -u github.com/golang/protobuf/protoc-gen-go
- go test -cover $(go list github.com/drone/drone/... | grep -v /vendor/)
test_postgres:
image: quay.io/armswarm/golang:1.9-alpine
environment:
- DATABASE_DRIVER=postgres
- DATABASE_CONFIG=host=postgres user=postgres dbname=postgres sslmode=disable
commands:
- go test github.com/drone/drone/store/datastore
build:
image: quay.io/armswarm/golang:1.9-alpine
environment:
- CGO_ENABLED=0
commands:
- go build -ldflags '-extldflags "-static" -X github.com/drone/drone/version.VersionDev=build.'$${DRONE_BUILD_NUMBER} -o drone-server github.com/drone/drone/cmd/drone-server
- go build -ldflags '-X github.com/drone/drone/version.VersionDev=build.'$${DRONE_BUILD_NUMBER} -o drone-agent github.com/drone/drone/cmd/drone-agent
when:
event: [ push, tag ]
publish_server:
image: quay.io/armswarm/drone-docker
secrets: [ docker_registry, docker_username, docker_password ]
repo: quay.io/armswarm/drone
dockerfile: Dockerfile
tag: [ "0.8.4", "0.8", "latest" ]
when:
branch: master
event: push
publish_agent:
image: quay.io/armswarm/drone-docker
secrets: [ docker_registry, docker_username, docker_password ]
repo: quay.io/armswarm/drone
dockerfile: Dockerfile.agent
tag: [ "0.8.4-agent", "0.8-agent", "latest-agent" ]
when:
branch: master
event: push
notify:
image: quay.io/armswarm/drone-slack
secrets: [ slack_webhook, plugin_channel, plugin_template ]
when:
status: [ failure, success ]
services:
postgres:
image: quay.io/armswarm/postgres:10.1-alpine
environment:
- POSTGRES_USER=postgres