generated from ministryofjustice/hmpps-template-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
153 lines (146 loc) · 4.07 KB
/
config.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
version: 2.1
orbs:
hmpps: ministryofjustice/hmpps@10
parameters:
alerts-slack-channel:
type: string
default: em-datastore-alerts
releases-slack-channel:
type: string
default: em-engineers-moj-madetech
jobs:
validate:
executor:
name: hmpps/localstack
jdk_tag: "21.0"
localstack_tag: "3.0"
steps:
- checkout
- restore_cache:
keys:
- gradle-{{ checksum "build.gradle.kts" }}
- gradle-
- run:
command: ./gradlew check
- save_cache:
paths:
- ~/.gradle
key: gradle-{{ checksum "build.gradle.kts" }}
- store_test_results:
path: build/test-results
- store_artifacts:
path: build/reports/tests
workflows:
version: 2
build-test-and-deploy:
jobs:
- validate:
filters:
tags:
ignore: /.*/
- hmpps/helm_lint:
name: helm_lint
- hmpps/build_multiplatform_docker:
name: build_docker
filters:
branches:
only:
- main
- deploy-dev
- hmpps/deploy_env:
name: deploy_dev
env: "dev"
jira_update: true
pipeline_id: <<pipeline.id>>
pipeline_number: <<pipeline.number>>
context: hmpps-common-vars
filters:
branches:
only:
- main
- deploy-dev
requires:
- validate
- build_docker
- helm_lint
helm_timeout: 5m
- request-preprod-approval:
type: approval
filters:
branches:
only:
- main
requires:
- deploy_dev
- hmpps/deploy_env:
name: deploy_preprod
env: "preprod"
jira_update: true
jira_env_type: staging
pipeline_id: <<pipeline.id>>
pipeline_number: <<pipeline.number>>
context:
- hmpps-common-vars
- hmpps-electronic-monitoring-datastore-preprod
requires:
- request-preprod-approval
helm_timeout: 5m
# - request-prod-approval:
# type: approval
# requires:
# - deploy_preprod
# - hmpps/deploy_env:
# name: deploy_prod
# env: "prod"
# jira_update: true
# jira_env_type: production
# pipeline_id: <<pipeline.id>>
# pipeline_number: <<pipeline.number>>
# slack_notification: true
# slack_channel_name: << pipeline.parameters.releases-slack-channel >>
# context:
# - hmpps-common-vars
# - hmpps-electronic-monitoring-datastore-prod
# requires:
# - request-prod-approval
# helm_timeout: 5m
security:
triggers:
- schedule:
cron: "15 7 * * 1-5"
filters:
branches:
only:
- main
jobs:
- hmpps/gradle_owasp_dependency_check:
cache_key: "v2_0"
jdk_tag: "21.0"
slack_channel: << pipeline.parameters.alerts-slack-channel >>
context:
- hmpps-common-vars
- hmpps/trivy_latest_scan:
slack_channel: << pipeline.parameters.alerts-slack-channel >>
additional_args: --db-repository public.ecr.aws/aquasecurity/trivy-db:2 --java-db-repository public.ecr.aws/aquasecurity/trivy-java-db:1
context:
- hmpps-common-vars
- hmpps/veracode_pipeline_scan:
jdk_tag: "21.0"
slack_channel: << pipeline.parameters.alerts-slack-channel >>
context:
- veracode-credentials
- hmpps-common-vars
security-weekly:
triggers:
- schedule:
cron: "0 5 * * 1"
filters:
branches:
only:
- main
jobs:
- hmpps/veracode_policy_scan:
slack_channel: << pipeline.parameters.alerts-slack-channel >>
context:
- veracode-credentials
- hmpps-common-vars