-
Notifications
You must be signed in to change notification settings - Fork 5
/
.drone.star
114 lines (111 loc) · 3.07 KB
/
.drone.star
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
def main(ctx):
return lint() + test() + rocketchat()
def lint():
return [
{
"kind": "pipeline",
"type": "docker",
"name": "lint",
"steps": [
{
"name": "starlark-format",
"image": "docker.io/owncloudci/bazel-buildifier",
"commands": [
"buildifier -d -diff_command='diff -u' .drone.star",
],
},
{
"name": "editorconfig-format",
"image": "docker.io/mstruebing/editorconfig-checker",
},
],
"depends_on": [],
"trigger": {
"ref": [
"refs/heads/master",
"refs/pull/**",
],
},
},
]
def test():
return [
{
"kind": "pipeline",
"type": "docker",
"name": "test",
"platform": {
"os": "linux",
"arch": "amd64",
},
"steps": [
{
"name": "lint",
"image": "docker.io/owncloudci/alpine",
"commands": [
"yamllint owncloud-*.yml",
],
},
{
"name": "link-check",
"image": "ghcr.io/tcort/markdown-link-check:stable",
"commands": [
"/src/markdown-link-check README.md",
],
},
],
"depends_on": [
"lint",
],
"trigger": {
"ref": [
"refs/heads/master",
"refs/tags/**",
"refs/pull/**",
],
},
},
]
def rocketchat():
return [
{
"kind": "pipeline",
"type": "docker",
"name": "rocketchat",
"platform": {
"os": "linux",
"arch": "amd64",
},
"clone": {
"disable": True,
},
"steps": [
{
"name": "notify",
"image": "docker.io/plugins/slack",
"failure": "ignore",
"settings": {
"webhook": {
"from_secret": "rocketchat_talk_webhook",
},
"channel": {
"from_secret": "rocketchat_talk_channel",
},
},
},
],
"depends_on": [
"test",
],
"trigger": {
"ref": [
"refs/heads/master",
"refs/tags/**",
],
"status": [
"changed",
"failure",
],
},
},
]