-
Notifications
You must be signed in to change notification settings - Fork 80
/
.drone.jsonnet
112 lines (111 loc) · 3.1 KB
/
.drone.jsonnet
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
local Pipeline(python_version, django_version) = {
"kind": "pipeline",
"name": "python:" + python_version + ",django" + django_version,
"platform": {
"os": "linux",
"arch": "amd64"
},
"steps": [
{
"name": "test",
"pull": "always",
"image": "python:" + python_version,
"commands": [
"make dependencies",
"pip install -U \"Django" + django_version + "\"",
"mkdir /var/log/silver",
"make lint",
"make test"
],
"settings": {
"group": "build"
},
"environment": {
"SILVER_DB_URL": "mysql://silver:silver@mysql/db"
}
},
{
"name": "publish-docker",
"pull": "if-not-exists",
"image": "plugins/docker",
"settings": {
"force_tag": true,
"group": "publish",
"repo": "presslabs/silver",
"tags": [
"${DRONE_BRANCH/master/latest}",
"${DRONE_COMMIT_SHA:0:7}"
],
"username": "_json_key",
"password": {
"from_secret": "DOCKERHUB_CONFIG_JSON"
}
},
"when": {
"event": [
"push",
"tag"
],
"branch": [
"master"
]
}
},
{
"name": "trigger-docs-build",
"pull": "if-not-exists",
"image": "plugins/downstream",
"settings": {
"fork": true,
"repositories": [
"presslabs/docs"
],
"server": "https://drone.presslabs.net"
},
"environment": {
"DRONE_TOKEN": {
"from_secret": "DRONE_TOKEN"
}
},
"when": {
"branch": [
"master"
],
"event": [
"push"
]
}
}
],
"services": [
{
"name": "mysql",
"pull": "if-not-exists",
"image": "mysql:5.7",
"environment": {
"MYSQL_DATABASE": "test_db",
"MYSQL_PASSWORD": "silver",
"MYSQL_ROOT_PASSWORD": "secret",
"MYSQL_USER": "silver"
},
"command": [
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
"--default-storage-engine=InnoDB"
]
},
{
"name": "redis",
"pull": "if-not-exists",
"image": "redis:3-alpine"
}
]
};
[
Pipeline("3.7", ">=3.1,<3.2"),
Pipeline("3.8", ">=3.1,<3.2"),
Pipeline("3.9", ">=3.1,<3.2"),
Pipeline("3.7", ">=3.2,<3.3"),
Pipeline("3.8", ">=3.2,<3.3"),
Pipeline("3.9", ">=3.2,<3.3"),
]