generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_parameterized
33 lines (27 loc) · 1014 Bytes
/
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
#!groovy
@Library("Infrastructure")
def type = "java"
def product = "pip"
def component = "publication-services"
def apiSecrets = [ 'pip-ss-kv-${env}' : [
secret('gov-uk-notify-api-testing-key', 'NOTIFY_API_KEY'),
secret('app-pip-publication-services-scope', 'APP_URI'),
secret('app-pip-publication-services-id', 'CLIENT_ID'),
secret('app-pip-publication-services-pwd', 'CLIENT_SECRET'),
secret('app-pip-data-management-scope', 'DATA_MANAGEMENT_AZ_API'),
secret('app-pip-subscription-management-scope', 'SUBSCRIPTION_MANAGEMENT_AZ_API'),
secret('app-pip-account-management-scope', 'ACCOUNT_MANAGEMENT_AZ_API'),
secret('app-tenant', 'TENANT_ID')
]
]
static Map<String, Object> secret(String secretName, String envVariable) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
envVariable: envVariable
]
}
withPipeline(type, product, component) {
loadVaultSecrets(apiSecrets)
enableSlackNotifications('#pip-build-notices')
}