-
Notifications
You must be signed in to change notification settings - Fork 37
/
.drone.yml
86 lines (78 loc) · 2.28 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
kind: pipeline
name: default
type: kubernetes
platform:
os: linux
arch: amd64
workspace:
path: /workdir
steps:
- name: build_and_test_image
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/dind
commands:
- apk add curl bash wget tar
- n=0; while [ "$n" -lt 60 ] && [ ! docker stats --no-stream ]; do n=$(( n + 1 )); sleep 1; done
- ./ci-build.sh
environment:
GEOIP_ACCOUNT_ID:
from_secret: geoip_account_id
GEOIP_LICENSE_KEY:
from_secret: geoip_license_key
when:
event:
- pull_request
- push
- tag
- name: anchore_scan
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/anchore-submission:latest
environment:
IMAGE_NAME: ngx:latest
WHITELIST: CVE-2019-5827 # Red Hat won't fix - https://access.redhat.com/security/cve/cve-2019-5827
depends_on:
- build_and_test_image
when:
event:
- push
- pull_request
- name: push_image_to_artifactory
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/dind
commands:
- docker login -u="$${DOCKER_USERNAME}" -p="$${DOCKER_PASSWORD}" "$${DOCKER_REPO}"
- ./publish.sh "ngx" "$${DOCKER_REPO}$${DOCKER_BASEDIR}$${DOCKER_IMAGE}" "$${DRONE_TAG}"
environment:
DOCKER_BASEDIR: /
DOCKER_IMAGE: nginx-proxy
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_REPO: artifactory-internal.digital.homeoffice.gov.uk
DOCKER_USERNAME: docker-nginx-proxy-robot
depends_on:
- build_and_test_image
when:
event:
- tag
- name: push_image_to_quay
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/dind
commands:
- docker login -u="$${DOCKER_USERNAME}" -p="$${DOCKER_QUAY_PASSWORD}" "$${DOCKER_REPO}"
- ./publish.sh "ngx" "$${DOCKER_REPO}$${DOCKER_BASEDIR}$${DOCKER_IMAGE}" "$${DRONE_TAG}"
environment:
DOCKER_BASEDIR: /ukhomeofficedigital/
DOCKER_IMAGE: nginx-proxy
DOCKER_QUAY_PASSWORD:
from_secret: docker_quay_password
DOCKER_REPO: quay.io
DOCKER_USERNAME: ukhomeofficedigital+nginx_proxy
depends_on:
- build_and_test_image
when:
event:
- tag
services:
- name: docker
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/dind
- name: anchore-submission-server
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/anchore-submission:latest
pull: always
commands:
- /run.sh server