-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
66 lines (61 loc) · 1.37 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
kind: pipeline
type: docker
name: main
platform:
os: linux
arch: amd64
workspace:
base: /data/drone-go
path: src/github.com/coffeehc/boot
clone:
depth: 1
volumes:
- name: pkgdeps
host:
path: /data/drone/gocache/pkg
- name: data
host:
path: /data/drone
steps:
- name: build
image: golang:1.16
pull: if-not-exists
environment:
GOPROXY: https://goproxy.cn,direct
GOPRIVATE: git.xiagaogao.com
GOSUMDB: sum.golang.google.cn
CGO_ENABLED: 0
volumes:
- name: pkgdeps
path: /go/pkg
- name: data
path: /data
commands:
- ln -s /data/gitconfig ~/.gitconfig
- go build -v
when:
branch:
include:
- feature/*
- master
- develop
event:
include:
- push
- pull_request
- name: notify
image: plugins/slack
pull: if-not-exists
settings:
webhook: https://hooks.slack.com/services/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
channel: dev
link_names: true
template: >
构建 git.xiagaogao.com/{{repo.owner}}/{{repo.name}} [{{build.branch}}]
{{build.tag}} {{build.commit}}
{{build.event}} #{{build.number}}
{{#success build.status}}
成功.:white_check_mark:
{{else}}
失败 :x: [{{build.link}}].
{{/success}}