forked from appleboy/drone-jenkins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
81 lines (74 loc) · 1.58 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
workspace:
base: /srv/app
path: src/github.com/appleboy/drone-jenkins
clone:
git:
image: plugins/git
depth: 50
tags: true
pipeline:
test:
image: appleboy/golang-testing
pull: true
environment:
TAGS: netgo
GOPATH: /srv/app
secrets: [ codecov_token ]
commands:
- make vet
- make lint
- make test
- make coverage
- make build
# build binary for docker image
- make static_build
when:
event: [ push, tag, pull_request ]
publish_latest:
image: plugins/docker
repo: ${DRONE_REPO}
tags: [ 'latest' ]
secrets: [ docker_username, docker_password ]
when:
event: [ push ]
branch: [ master ]
local: false
release:
image: appleboy/golang-testing
pull: true
environment:
TAGS: netgo
GOPATH: /srv/app
commands:
- make release
when:
event: [ tag ]
branch: [ refs/tags/* ]
local: false
publish_tag:
image: plugins/docker
repo: ${DRONE_REPO}
tags: [ '${DRONE_TAG}' ]
secrets: [ docker_username, docker_password ]
group: release
when:
event: [ tag ]
branch: [ refs/tags/* ]
local: false
release_tag:
image: plugins/github-release
secrets: [ github_release_api_key ]
group: release
files:
- dist/release/*
when:
event: [ tag ]
branch: [ refs/tags/* ]
local: false
facebook:
image: appleboy/drone-facebook
secrets: [ fb_page_token, fb_verify_token ]
pull: true
to: 1234973386524610
when:
status: [ changed, failure ]