forked from quay/clair
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.jsonnet
60 lines (57 loc) · 1.35 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
local pipeline(goVersion, postgresVersion) = {
kind: 'pipeline',
name: 'go-' + goVersion + '-postgres' + postgresVersion,
workspace: {
base: '/go',
path: 'clair',
},
clone: { depth: 50 },
services: [{
name: 'postgres',
image: 'postgres:' + postgresVersion + '-alpine',
ports: [5432],
}],
steps: [
{
name: 'lint',
image: 'golang:' + goVersion + '-alpine',
commands: [
'apk add --no-cache git build-base clang',
'make lint-proto',
'git diff --exit-code',
],
},
{
name: 'compile',
image: 'golang:' + goVersion + '-alpine',
commands: [
'apk add --no-cache build-base git rpm xz',
'make build',
],
},
{
name: 'unit tests',
image: 'golang:' + goVersion + '-alpine',
commands: [
'apk add --no-cache build-base git rpm xz',
'git config --global user.name "Test"',
'git config --global user.email "[email protected]"',
'make unit-test',
],
},
{
name: 'db tests',
image: 'golang:' + goVersion + '-alpine',
commands: [
'apk add --no-cache build-base git rpm xz',
'make db-test',
],
environment: { CLAIR_TEST_PGSQL: 'postgres@postgres:5432' },
},
],
};
[
pipeline('1.12', '9'),
pipeline('1.12', '10'),
pipeline('1.12', '11'),
]