generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile_parameterized
63 lines (58 loc) · 3.23 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!groovy
@Library("Infrastructure")
def type = "java"
def product = "darts"
def component = "api"
def kv = product + '-ss-kv'
def secrets = [
'darts-${env}': [
secret('GovukNotifyTestApiKey', 'GOVUK_NOTIFY_API_KEY'),
secret('app-insights-connection-string', 'app-insights-connection-string'),
secret('AzureAdB2CTenantId', 'AAD_B2C_TENANT_ID'),
secret('AzureAdB2CClientId', 'AAD_B2C_CLIENT_ID'),
secret('AzureAdB2CClientSecret', 'AAD_B2C_CLIENT_SECRET'),
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'),
secret('api-POSTGRES-SCHEMA', 'DARTS_API_DB_SCHEMA'),
secret('AzureStorageConnectionString', 'AZURE_STORAGE_CONNECTION_STRING'),
secret('AzureADTenantId', 'AAD_TENANT_ID'),
secret('AzureADClientId', 'AAD_CLIENT_ID'),
secret('AzureADClientSecret', 'AAD_CLIENT_SECRET'),
secret('AzureADTenantIdJustice', 'AAD_TENANT_ID_JUSTICE'),
secret('AzureADClientIdJustice', 'AAD_CLIENT_ID_JUSTICE'),
secret('AzureADClientSecretJustice', 'AAD_CLIENT_SECRET_JUSTICE'),
secret('XhibitUserName', 'XHIBIT_USER_NAME'),
secret('XhibitPassword', 'XHIBIT_PASSWORD'),
secret('CppUserName', 'CPP_USER_NAME'),
secret('CppPassword', 'CPP_PASSWORD'),
secret('DarPcUserName', 'DARPC_USER_NAME'),
secret('DarPcPassword', 'DARPC_PASSWORD'),
secret('DarMidTierUserName', 'DAR_MIDTIER_USER_NAME'),
secret('DarMidTierPassword', 'DAR_MIDTIER_PASSWORD'),
secret('AzureADFunctionalTestUsername', 'AZURE_AD_FUNCTIONAL_TEST_USERNAME'),
secret('AzureADFunctionalTestPassword', 'AZURE_AD_FUNCTIONAL_TEST_PASSWORD'),
secret('DartsSystemUserEmail', 'SYSTEM_USER_EMAIL'),
secret('AzureAdB2CFuncTestROPCGlobalUsername', 'AZURE_AD_FUNCTIONAL_TEST_GLOBAL_USERNAME'),
secret('AzureAdB2CFuncTestROPCGlobalPassword', 'AZURE_AD_FUNCTIONAL_TEST_GLOBAL_PASSWORD'),
secret('ARMSasEndpoint', 'ARM_SAS_ENDPOINT'),
secret('DETSSasURLEndpoint', 'DETS_SAS_URL_ENDPOINT'),
secret('DartsInboundStorageSasUrl', 'DARTS_INBOUND_STORAGE_SAS_URL'),
secret('DartsUnstructuredStorageSasUrl', 'DARTS_UNSTRUCTURED_STORAGE_SAS_URL'),
secret('ArmServiceEntitlement', 'ARM_SERVICE_ENTITLEMENT'),
secret('ArmStorageAccountName', 'ARM_STORAGE_ACCOUNT_NAME')
],
]
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')
}