forked from UKHomeOffice/docker-clamav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
88 lines (82 loc) · 2.85 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
82
83
84
85
86
87
88
pipeline:
test_build:
image: docker:17.09.0-ce
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
commands:
- apk add --no-cache bash sed grep bc coreutils curl
- ./ci-build.sh
when:
event: [push, pull_request]
build_clamav:
image: docker:17.09.0-ce
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
commands:
- docker build -t clamav:$${DRONE_COMMIT_SHA} .
when:
branch: master
event: [push, tag]
build_clamav-rest:
image: docker:17.09.0-ce
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
commands:
- docker build -t clamav-rest:$${DRONE_COMMIT_SHA} clamav-rest
when:
branch: master
event: [push, tag]
clamav_to_quay:
image: docker:17.09.0-ce
secrets:
- clamav_repo_token
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
commands:
- docker login -u="ukhomeofficedigital+drone" -p=$${CLAMAV_REPO_TOKEN} quay.io
- docker tag clamav:$${DRONE_COMMIT_SHA} quay.io/ukhomeofficedigital/clamav:$${DRONE_COMMIT_SHA}
- docker tag clamav:$${DRONE_COMMIT_SHA} quay.io/ukhomeofficedigital/clamav:latest
- docker push quay.io/ukhomeofficedigital/clamav:$${DRONE_COMMIT_SHA}
- docker push quay.io/ukhomeofficedigital/clamav:latest
when:
branch: master
event: push
clamav-rest_to_quay:
image: docker:17.09.0-ce
secrets:
- clamav_repo_token
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
commands:
- docker login -u="ukhomeofficedigital+drone" -p=$${CLAMAV_REPO_TOKEN} quay.io
- docker tag clamav-rest:$${DRONE_COMMIT_SHA} quay.io/ukhomeofficedigital/clamav-rest:$${DRONE_COMMIT_SHA}
- docker tag clamav-rest:$${DRONE_COMMIT_SHA} quay.io/ukhomeofficedigital/clamav-rest:latest
- docker push quay.io/ukhomeofficedigital/clamav-rest:$${DRONE_COMMIT_SHA}
- docker push quay.io/ukhomeofficedigital/clamav-rest:latest
when:
branch: master
event: push
tagged_clamav_to_quay:
image: docker:17.09.0-ce
secrets:
- clamav_repo_token
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
commands:
- docker login -u="ukhomeofficedigital+drone" -p=$${CLAMAV_REPO_TOKEN} quay.io
- docker tag clamav:$${DRONE_COMMIT_SHA} quay.io/ukhomeofficedigital/clamav:$${DRONE_TAG}
- docker push quay.io/ukhomeofficedigital/clamav:$${DRONE_TAG}
when:
event: tag
tagged_clamav-rest_to_quay:
image: docker:17.09.0-ce
secrets:
- clamav_repo_token
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
commands:
- docker login -u="ukhomeofficedigital+drone" -p=$${CLAMAV_REPO_TOKEN} quay.io
- docker tag clamav-rest:$${DRONE_COMMIT_SHA} quay.io/ukhomeofficedigital/clamav-rest:$${DRONE_TAG}
- docker push quay.io/ukhomeofficedigital/clamav-rest:$${DRONE_TAG}
when:
event: tag