-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
54 lines (47 loc) · 1.53 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
kind: pipeline
name: default
type: kubernetes
steps:
- name: install
image: node:14
commands:
- npm ci
- name: test
image: node:14
commands:
- npm test
- name: audit
image: node:14
commands:
- npm audit --audit-level=high --production
- name: docker build
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/dind
commands:
# wait for docker service to be up before running docker build
- n=0; while [ "$n" -lt 60 ] && [ ! docker stats --no-stream ]; do n=$(( n + 1 )); sleep 1; done
- docker build -t html-pdf-converter .
- name: scan-image
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/anchore-submission:latest
pull: always
environment:
IMAGE_NAME: html-pdf-converter
WHITELIST_FILE: cve-exceptions.txt
- name: docker push
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/dind
environment:
DOCKER_PASSWORD:
from_secret: docker_password
commands:
- docker login -u="ukhomeofficedigital+html_pdf_converter" -p=$${DOCKER_PASSWORD} quay.io
- docker tag html-pdf-converter quay.io/ukhomeofficedigital/html-pdf-converter:$${DRONE_TAG}
- docker push quay.io/ukhomeofficedigital/html-pdf-converter:$${DRONE_TAG}
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