This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile_CNP
65 lines (52 loc) · 1.57 KB
/
Jenkinsfile_CNP
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
#!groovy
properties(
[[$class: 'GithubProjectProperty', projectUrlStr: 'https://github.com/hmcts/ctsc-work-allocation.git'],
pipelineTriggers([[$class: 'GitHubPushTrigger']])]
)
@Library('Infrastructure')
def type = "java"
def product = "ctsc"
def app = "work-allocation"
def onMasterNotificationsChannel = '#ctsc-master-builds'
def onDemoNotificationsChannel = '#ctsc-demo-builds'
def onPRNotificationsChannel = '#ctsc-pr-builds'
def secrets = [
's2s-${env}': [
secret('microservicekey-ctsc-work-allocation', 'S2S_IDAM_SECRET')
]
]
def vaultOverrides = [
'preview': 'aat',
'spreview': 'saat',
'hmctsdemo': 'aat'
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
withPipeline(type, product, app) {
onMaster {
enableSlackNotifications(onMasterNotificationsChannel)
}
onDemo {
enableSlackNotifications(onDemoNotificationsChannel)
}
onPR {
enableSlackNotifications(onPRNotificationsChannel)
}
overrideVaultEnvironments(vaultOverrides)
loadVaultSecrets(secrets)
enableSlackNotifications('#ctstc-tech-internal')
disableLegacyDeployment()
enableAksStagingDeployment()
after('functionalTest:preview') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
after('functionalTest:aat') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
}