generated from ministryofjustice/hmpps-template-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.yml.bak.20250226_172318
151 lines (146 loc) · 3.93 KB
/
config.yml.bak.20250226_172318
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
version: 2.1
orbs:
hmpps: ministryofjustice/hmpps@9
slack: circleci/slack@4.12.5
parameters:
alerts-slack-channel:
type: string
default: probation-integration-notifications
releases-slack-channel:
type: string
default: probation-integration-notifications
jobs:
validate:
executor:
name: hmpps/java_localstack_postgres
jdk_tag: "21.0"
localstack_tag: "3"
postgres_tag: "16"
steps:
- checkout
- hmpps/install_aws_cli
- run:
name: Wait for SQS to be ready
command: curl -4 --connect-timeout 30 --retry-connrefused --retry 2
--retry-delay 5 http://localhost:4566
- restore_cache:
keys:
- gradle-{{ checksum "build.gradle.kts" }}
- gradle-
- run:
command: ./gradlew -Dorg.gradle.jvmargs="--illegal-access=permit"
-Dkotlin.daemon.jvm.options="--illegal-access=permit" check
- when:
condition:
equal: [ main, << pipeline.git.branch >> ]
steps:
- slack/notify:
event: fail
channel: << pipeline.parameters.alerts-slack-channel >>
template: basic_fail_1
- save_cache:
paths:
- ~/.gradle
key: gradle-{{ checksum "build.gradle.kts" }}
- store_test_results:
path: build/test-results
- store_artifacts:
path: build/reports/tests/test
- store_artifacts:
path: build/reports/coverage
destination: coverage
workflows:
version: 2
build-test-and-deploy:
jobs:
- validate:
context: hmpps-common-vars
filters:
tags:
ignore: /.*/
- hmpps/helm_lint:
name: helm_lint
- hmpps/build_docker:
name: build_docker
filters:
branches:
only:
- main
- hmpps/deploy_env:
name: deploy_dev
env: "dev"
jira_update: true
jira_env_type: development
context: hmpps-common-vars
filters:
branches:
only:
- main
requires:
- validate
- build_docker
- helm_lint
helm_timeout: 5m
- hmpps/deploy_env:
name: deploy_preprod
env: "preprod"
jira_update: true
jira_env_type: staging
context:
- hmpps-common-vars
- hmpps-tier-preprod
filters:
branches:
only:
- main
requires:
- validate
- build_docker
- helm_lint
helm_timeout: 5m
- request-prod-approval:
type: approval
requires:
- deploy_preprod
- deploy_dev
- hmpps/deploy_env:
name: deploy_prod
env: "prod"
jira_update: true
jira_env_type: production
slack_notification: true
slack_channel_name: << pipeline.parameters.releases-slack-channel >>
context:
- hmpps-common-vars
- hmpps-tier-prod
requires:
- request-prod-approval
helm_timeout: 5m
security:
triggers:
- schedule:
cron: "45 9 * * 1-5"
filters:
branches:
only:
- main
jobs:
- hmpps/veracode_pipeline_scan:
slack_channel: << pipeline.parameters.alerts-slack-channel >>
context:
- hmpps-common-vars
- veracode-credentials
security-weekly:
triggers:
- schedule:
cron: "32 5 * * 1"
filters:
branches:
only:
- main
jobs:
- hmpps/veracode_policy_scan:
slack_channel: << pipeline.parameters.alerts-slack-channel >>
context:
- veracode-credentials
- hmpps-common-vars