-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathJenkinsfile_parameterized
46 lines (41 loc) · 1.58 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") _
properties([
parameters([
choice(name: 'ENVIRONMENT', choices: 'saat\nsprod\nsandbox', description: 'Environment where code should be build and deployed')
]),
pipelineTriggers([[$class: 'GitHubPushTrigger']])
])
def secrets = [
'ccd-${env}': [
secret('ccd-importer-autotest-email', 'CCD_IMPORT_AUTOTEST_EMAIL'),
secret('ccd-importer-autotest-password', 'CCD_IMPORT_AUTOTEST_PASSWORD'),
secret('ccd-caseworker-autotest-email', 'CCD_CASEWORKER_AUTOTEST_EMAIL'),
secret('ccd-caseworker-autotest-password', 'CCD_CASEWORKER_AUTOTEST_PASSWORD'),
secret('ccd-api-gateway-oauth2-client-secret', 'OAUTH2_CLIENT_SECRET'),
],
's2s-${env}': [
secret('microservicekey-ccd-gw', 'BEFTA_S2S_CLIENT_SECRET'),
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[
$class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
def vaultOverrides = [
'preview': 'aat',
'spreview': 'saat'
]
// from PR-20 withParameterizedPipeline('java', 'ccd', 'definition-store-api', params.ENVIRONMENT, 'sandbox') {
// from master withParameterizedPipeline(params.TYPE, params.PRODUCT_NAME, params.APP, params.ENVIRONMENT, params.SUBSCRIPTION) {
withParameterizedPipeline('java', 'ccd', 'definition-store-api', params.ENVIRONMENT, 'sandbox') {
enableSlackNotifications('#ccd-param-builds')
enableDbMigration()
overrideVaultEnvironments(vaultOverrides)
loadVaultSecrets(secrets)
}