-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
46 lines (41 loc) · 1.25 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
---
kind: pipeline
name: default
type: kubernetes
steps:
- name: build
pull: if-not-exists
image: node:14
commands:
- yarn install --frozen-lockfile
- yarn run test
when:
branch: master
event: [ push, pull_request ]
- name: build_file-vault
pull: if-not-exists
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/dind
commands:
- n=0; while [ "$n" -lt 60 ] && [ ! docker stats --no-stream ]; do n=$(( n + 1 )); sleep 1; done
- docker build -t file-vault-$${DRONE_COMMIT_SHA} .
when:
branch: master
event: [ push, pull_request ]
- name: image_to_quay
pull: if-not-exists
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/dind
environment:
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
commands:
- n=0; while [ "$n" -lt 60 ] && [ ! docker stats --no-stream ]; do n=$(( n + 1 )); sleep 1; done
- docker login -u="ukhomeofficedigital+drone" -p=$${DOCKER_PASSWORD} quay.io
- docker tag file-vault-$${DRONE_COMMIT_SHA} quay.io/ukhomeofficedigital/file-vault:$${DRONE_COMMIT_SHA}
- docker push quay.io/ukhomeofficedigital/file-vault:$${DRONE_COMMIT_SHA}
when:
branch: master
event: [ push, pull_request ]
services:
- name: docker
image: 340268328991.dkr.ecr.eu-west-2.amazonaws.com/acp/dind
...