-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
108 lines (103 loc) · 3.32 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
matrix:
JIRA_VERSION:
- 8.7.1
pipeline:
build_jira:
image: ukhomeoffice/drone-docker
repo: quay.io/ukhomeofficedigital/jira-docker
secrets: [ docker_username, docker_password ]
registry: quay.io
context: app/jira-docker
dockerfile: app/jira-docker/Dockerfile
force_tag: true
build_args:
- JIRA_VERSION=${JIRA_VERSION}
tags:
- ${DRONE_COMMIT_SHA}
- b${DRONE_BUILD_NUMBER}
when:
event: push
build_jira_backup:
image: ukhomeoffice/drone-docker
repo: quay.io/ukhomeofficedigital/dq-jira-s3-backup
secrets: [ docker_username, docker_password ]
registry: quay.io
context: app/jira-s3-backup
dockerfile: app/jira-s3-backup/Dockerfile
tags:
- ${DRONE_COMMIT_SHA}
- b${DRONE_BUILD_NUMBER}
when:
event: push
build_access_log:
image: ukhomeoffice/drone-docker
repo: quay.io/ukhomeofficedigital/dq-logger
secrets: [ docker_username, docker_password ]
registry: quay.io
context: app/jira-logger
dockerfile: app/jira-logger/Dockerfile
tags:
- ${DRONE_COMMIT_SHA}
- b${DRONE_BUILD_NUMBER}
when:
event: push
deploy_to_dev:
image: quay.io/ukhomeofficedigital/kd
environment:
- ENV=notprod
- JIRA_VERSION=${JIRA_VERSION}
- KUBE_NAMESPACE=dq-management-notprod
- INSECURE_SKIP_TLS_VERIFY=true
- JIRA_HOME_VOLUME_SIZE=10Gi
- HOSTNAME=jira.notprod.dq.homeoffice.gov.uk
- DATABASE_SECRET_NAME=dq-jira-notprod-rds-access
- AWS_BUCKET_SECRET_NAME=s3-dq-notprod-management-jira-backup
- DATABASE_SCHEMA_NAME=public
commands:
- export KUBE_TOKEN=$$NOTPROD_KUBE_TOKEN
- export KUBE_SERVER=$$NOTPROD_KUBE_SERVER
- export BUCKET_NAME=$$NOTPROD_BUCKET_NAME
- export ACCESS_KEY_ID=$$NOTPROD_ACCESS_KEY_ID
- export SECRET_ACCESS_KEY=$$NOTPROD_SECRET_ACCESS_KEY
- export SLACK_WEBHOOK=$$NOTPROD_SLACK_WEBHOOK
- kd -f network-policy.yml -f pvc.yml -f service.yml -f ingress.yml -f secrets.yml -f deployment.yml
secrets:
- NOTPROD_KUBE_TOKEN
- NOTPROD_KUBE_SERVER
- NOTPROD_BUCKET_NAME
- NOTPROD_ACCESS_KEY_ID
- NOTPROD_SECRET_ACCESS_KEY
- NOTPROD_SLACK_WEBHOOK
when:
event: push
deploy_to_prod:
image: quay.io/ukhomeofficedigital/kd
environment:
- ENV=prod
- JIRA_VERSION=${JIRA_VERSION}
- KUBE_NAMESPACE=dq-management
- INSECURE_SKIP_TLS_VERIFY=true
- JIRA_HOME_VOLUME_SIZE=25Gi
- HOSTNAME=jira.dq.homeoffice.gov.uk
- DATABASE_SECRET_NAME=dq-management-jira-rds-access
- AWS_BUCKET_SECRET_NAME=s3-dq-management-jira-backup
- DATABASE_SCHEMA_NAME=public
commands:
- export KUBE_TOKEN=$$PROD_KUBE_TOKEN
- export KUBE_SERVER=$$PROD_KUBE_SERVER
- export BUCKET_NAME=$$PROD_BUCKET_NAME
- export ACCESS_KEY_ID=$$PROD_ACCESS_KEY_ID
- export SECRET_ACCESS_KEY=$$PROD_SECRET_ACCESS_KEY
- export SLACK_WEBHOOK=$$PROD_SLACK_WEBHOOK
- kd -f network-policy.yml -f pvc.yml -f service.yml -f ingress.yml -f secrets.yml -f deployment.yml
secrets:
- PROD_KUBE_TOKEN
- PROD_KUBE_SERVER
- PROD_BUCKET_NAME
- PROD_ACCESS_KEY_ID
- PROD_SECRET_ACCESS_KEY
- PROD_SLACK_WEBHOOK
when:
environment: production
branch: master
event: deployment