forked from hmcts/darts-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile_parameterized
More file actions
55 lines (50 loc) · 2.28 KB
/
Jenkinsfile_parameterized
File metadata and controls
55 lines (50 loc) · 2.28 KB
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 = "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_KEY'),
secret('AzureAdB2CClientId', 'AAD_B2C_CLIENT_ID_KEY'),
secret('AzureAdB2CClientSecret', 'AAD_B2C_CLIENT_SECRET_KEY'),
secret('AzureAdB2CFuncTestROPCUsername', 'FUNC_TEST_ROPC_USERNAME'),
secret('AzureAdB2CFuncTestROPCPassword', 'FUNC_TEST_ROPC_PASSWORD'),
secret('AzureAdB2CFuncTestROPCClientId', 'AAD_B2C_ROPC_CLIENT_ID_KEY'),
secret('AzureAdB2CFuncTestROPCClientSecret', 'AAD_B2C_ROPC_CLIENT_SECRET_KEY'),
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('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('ARMConnectionString', 'ARM_STORAGE_CONNECTION_STRING'),
],
]
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')
}