generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile_parameterized
46 lines (38 loc) · 1.86 KB
/
Jenkinsfile_parameterized
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
#!groovy
@Library("Infrastructure")
def type = "java"
def product = "darts"
def component = "gateway"
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
]
}
withParameterizedPipeline(type, product, component, 'sbox', 'sbox') {
loadVaultSecrets(secrets)
enableSlackNotifications('#darts-builds')
}