generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile_CNP
55 lines (41 loc) · 2.03 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
#!groovy
@Library("Infrastructure")
def type = "java"
def product = "darts"
def component = "gateway"
def branchesToSync = ['demo', 'perftest', 'ithc']
def secrets = [
'darts-${env}': [
secret('app-insights-connection-string', 'app-insights-connection-string'),
secret('AzureAdB2CClientId', 'AAD_B2C_CLIENT_ID'),
secret('AzureStorageConnectionString', 'AZURE_STORAGE_CONNECTION_STRING'),
secret('ExternalServiceBasicAuthorisationWhitelist', 'EXTERNAL_SERVICE_BASIC_AUTHORISATION_WHITELIST'),
secret('ViQExternalUserName', 'VIQ_EXTERNAL_USER_NAME'),
secret('ViQExternalPassword', 'VIQ_EXTERNAL_PASSWORD'),
secret('ViQInternalPassword', 'VIQ_INTERNAL_PASSWORD'),
secret('XhibitExternalUserName', 'XHIBIT_EXTERNAL_USER_NAME'),
secret('XhibitExternalPassword', 'XHIBIT_EXTERNAL_PASSWORD'),
secret('XhibitInternalPassword', 'XHIBIT_INTERNAL_PASSWORD'),
secret('CPExternalUserName', 'CP_EXTERNAL_USER_NAME'),
secret('CPExternalPassword', 'CP_EXTERNAL_PASSWORD'),
secret('CPInternalPassword', 'CP_INTERNAL_PASSWORD'),
secret('AzureAdB2CFuncTestROPCClientId', 'AAD_B2C_ROPC_CLIENT_ID'),
secret('AzureAdB2CFuncTestROPCUsername', 'FUNC_TEST_ROPC_USERNAME'),
secret('AzureAdB2CFuncTestROPCPassword', 'FUNC_TEST_ROPC_PASSWORD'),
secret('AzureAdB2CFuncTestROPCClientId', 'AAD_B2C_ROPC_CLIENT_ID'),
secret('AzureAdB2CFuncTestROPCClientSecret', 'AAD_B2C_ROPC_CLIENT_SECRET')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
version : '',
envVariable: envVar
]
}
withPipeline(type, product, component) {
loadVaultSecrets(secrets)
enableSlackNotifications('#darts-builds')
syncBranchesWithMaster(branchesToSync)
}