-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile_parameterized
69 lines (59 loc) · 2.34 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
64
65
66
67
68
69
#!groovy
//noinspection GroovyUnusedAssignment
@Library("Infrastructure") _
//noinspection GroovyAssignabilityCheck
properties([
parameters([
choice(name: 'ENVIRONMENT', choices: 'sandbox\nsaat\nsprod\nnonprod\nprod', description: 'Environment where code should be build and deployed')
])
])
String product = "probate"
String component = "business-service"
List<LinkedHashMap<String, Object>> secrets = [
secret('probatePersistenceUrl', 'TEST_PERSISTENCE_URL'),
secret('probateNotifyMobile', 'TEST_MOBILE'),
secret('pdfservice-url', 'TEST_PDFSERVICE_URL'),
secret('serviceAuthProviderBaseUrl', 'SERVICE_AUTH_PROVIDER_BASE_URL'),
secret('s2sAuthTotpSecret', 'S2S_AUTH_TOTP_SECRET'),
secret('probateIdamSecret', 'IDAM_SECRET'),
secret('probateIdamUserName', 'IDAM_USERNAME'),
secret('probateIdamPassword', 'IDAM_USERPASSWORD'),
secret('probate-notify-invite-apikey', 'PROBATE_NOTIFY_KEY')
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
withParameterizedPipeline('java', product, component, params.ENVIRONMENT, 'sandbox') {
loadVaultSecrets(secrets)
afterSuccess('test') {
publishHTML target: [
alwaysLinkToLastBuild: true,
reportDir : "build/reports/tests/test",
reportFiles : "index.html",
reportName : "sol-ccd-service Test Report"
]
publishHTML target: [
alwaysLinkToLastBuild: true,
reportDir : "build/reports/jacoco",
reportFiles : "index.html",
reportName : "sol-ccd-service Code Coverage Report"
]
publishHTML target: [
alwaysLinkToLastBuild: true,
reportDir : "build/reports/findbugs",
reportFiles : "main.html",
reportName : "sol-ccd-service find Bugs Report"
]
}
afterSuccess('functionalTest:preview') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
afterSuccess('functionalTest:aat') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
}