forked from UKHomeOffice/docker-nginx-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
46 lines (43 loc) · 1.39 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
workspace:
base: /workdir
pipeline:
build_and_test_image:
image: quay.io/ukhomeofficedigital/centos-base:latest
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
commands:
- yum update -y
- yum install -y -q docker openssl wget
- ./ci-build.sh
when:
event: [pull_request, push, tag]
push_image_to_artifactory:
image: docker:17.12.0
secrets:
- docker_password
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
- DOCKER_IMAGE=nginx-proxy
- DOCKER_REPO=artifactory-internal.digital.homeoffice.gov.uk
- DOCKER_BASEDIR=/
- DOCKER_USERNAME=docker-nginx-proxy-robot
commands:
- docker login -u="$${DOCKER_USERNAME}" -p="$${DOCKER_PASSWORD}" "$${DOCKER_REPO}"
- ./publish.sh "ngx" "$${DOCKER_REPO}$${DOCKER_BASEDIR}$${DOCKER_IMAGE}" "$${DRONE_TAG}"
when:
event: tag
push_image_to_quay:
image: docker:17.12.0
secrets:
- docker_quay_password
environment:
- DOCKER_HOST=tcp://172.17.0.1:2375
- DOCKER_IMAGE=nginx-proxy
- DOCKER_REPO=quay.io
- DOCKER_BASEDIR=/ukhomeofficedigital/
- DOCKER_USERNAME=ukhomeofficedigital+nginx_proxy
commands:
- docker login -u="$${DOCKER_USERNAME}" -p="$${DOCKER_QUAY_PASSWORD}" "$${DOCKER_REPO}"
- ./publish.sh "ngx" "$${DOCKER_REPO}$${DOCKER_BASEDIR}$${DOCKER_IMAGE}" "$${DRONE_TAG}"
when:
event: tag