-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone-v1.yml
153 lines (143 loc) · 3.59 KB
/
.drone-v1.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
---
kind: pipeline
name: default
type: kubernetes
platform:
os: linux
arch: amd64
steps:
- name: Build library
pull: if-not-exists
image: quay.io/ukhomeofficedigital/scala-sbt-nodejs:v1.4.0-debian12-jdk17-node20
commands:
- /root/entrypoint.sh
- sbt +compile
environment:
ARTIFACTORY_PASSWORD:
from_secret: ARTIFACTORY_PASSWORD
ARTIFACTORY_USERNAME: drt_ci
when:
event:
- push
- name: Unit tests
pull: if-not-exists
image: quay.io/ukhomeofficedigital/scala-sbt-nodejs:v1.4.0-debian12-jdk17-node20
commands:
- /root/entrypoint.sh
- sbt --error +test
environment:
JAVA_OPTS: -Xmx2g
ARTIFACTORY_PASSWORD:
from_secret: ARTIFACTORY_PASSWORD
ARTIFACTORY_USERNAME: drt_ci
when:
event:
- push
depends_on:
- Build library
- name: Publish library
pull: if-not-exists
image: quay.io/ukhomeofficedigital/scala-sbt-nodejs:v1.4.0-debian12-jdk17-node20
commands:
- /root/entrypoint.sh
- sbt +publish
environment:
ARTIFACTORY_PASSWORD:
from_secret: ARTIFACTORY_PASSWORD
ARTIFACTORY_USERNAME: drt_ci
when:
event:
- push
depends_on:
- Unit tests
- name: Slack notification
pull: if-not-exists
image: plugins/slack
settings:
channel: devs
template: "*{{repo.name}}: _{{build.status}}_*\nCompleted build *{{build.number}}* after *{{since build.started}}* on *{{build.branch}}*\n{{build.link}}\n"
environment:
SLACK_WEBHOOK:
from_secret: slack_webhook
when:
status: [ success, failure ]
event:
- push
depends_on:
- Unit tests
- name: Code coverage report
pull: if-not-exists
image: quay.io/ukhomeofficedigital/scala-sbt-nodejs::v1.4.0-debian12-jdk17-node20
commands:
- /root/entrypoint.sh
- sbt -mem 4096 --error coverage test | true
- sbt coverageReport
environment:
ARTIFACTORY_PASSWORD:
from_secret: ARTIFACTORY_PASSWORD
ARTIFACTORY_USERNAME: drt_ci
ENV_LOG_LEVEL: ERROR
when:
event:
- push
branch:
- master
depends_on:
- Unit tests
- name: Scapegoat
pull: if-not-exists
image: quay.io/ukhomeofficedigital/scala-sbt-nodejs::v1.4.0-debian12-jdk17-node20
commands:
- /root/entrypoint.sh
- sbt scapegoat | true
environment:
ARTIFACTORY_PASSWORD:
from_secret: ARTIFACTORY_PASSWORD
ARTIFACTORY_USERNAME: drt_ci
ENV_LOG_LEVEL: ERROR
when:
event:
- push
branch:
- master
depends_on:
- Code coverage report
- name: Dependency check
pull: if-not-exists
image: quay.io/ukhomeofficedigital/scala-sbt-nodejs::v1.4.0-debian12-jdk17-node20
commands:
- /root/entrypoint.sh
- sbt -mem 4096 dependencyCheck
environment:
NVD_BASE_URL: http://nvdmirror:8008
ARTIFACTORY_PASSWORD:
from_secret: ARTIFACTORY_PASSWORD
ARTIFACTORY_USERNAME: drt_ci
ENV_LOG_LEVEL: ERROR
when:
event:
- push
branch:
- master
depends_on:
- Scapegoat
- name: Sonar scanner
pull: if-not-exists
image: quay.io/ukhomeofficedigital/sonar-scanner:v4.6
commands:
- sonar-scanner -Dsonar.projectVersion=B${DRONE_BUILD_NUMBER}
environment:
DRONE_BUILD_NUMBER: ${DRONE_BUILD_NUMBER}
when:
branch:
- master
event:
- push
depends_on:
- Dependency check
services:
- name: NVD mirror service
image: sspringett/nvdmirror
ports:
- 8008
...