generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile_CNP
81 lines (60 loc) · 2.6 KB
/
Jenkinsfile_CNP
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
70
71
72
73
74
75
76
77
78
79
80
81
#!groovy
properties([
[$class: 'GithubProjectProperty', projectUrlStr: 'https://github.com/hmcts/ia-case-payments-api.git'],
pipelineTriggers([[$class: 'GitHubPushTrigger']])
])
@Library("Infrastructure")
import uk.gov.hmcts.contino.AppPipelineDsl
def type = "java"
def product = "ia"
def component = "case-payments-api"
def secrets = [
'ia-${env}': [
secret('test-law-firm-a-username', 'TEST_LAW_FIRM_A_USERNAME'),
secret('test-law-firm-a-password', 'TEST_LAW_FIRM_A_PASSWORD'),
secret('test-law-firm-org-success-username', 'TEST_LAW_FIRM_ORG_SUCCESS_USERNAME'),
secret('test-law-firm-org-success-password', 'TEST_LAW_FIRM_ORG_SUCCESS_PASSWORD'),
secret('test-law-firm-org-deleted-username', 'TEST_LAW_FIRM_ORG_DELETED_USERNAME'),
secret('test-law-firm-org-deleted-password', 'TEST_LAW_FIRM_ORG_DELETED_PASSWORD'),
secret('test-citizen-username', 'TEST_CITIZEN_USERNAME'),
secret('test-citizen-password', 'TEST_CITIZEN_PASSWORD'),
secret('system-username', 'IA_SYSTEM_USERNAME'),
secret('system-password', 'IA_SYSTEM_PASSWORD'),
secret('idam-redirect-uri', 'IA_IDAM_REDIRECT_URI'),
secret('idam-client-id', 'IA_IDAM_CLIENT_ID'),
secret('idam-secret', 'IA_IDAM_SECRET'),
secret('s2s-secret', 'IA_S2S_SECRET'),
secret('s2s-microservice', 'IA_S2S_MICROSERVICE'),
secret('ia-config-validator-secret', 'IA_CONFIG_VALIDATOR_SECRET')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
version : '',
envVariable: envVar
]
}
withPipeline(type, product, component) {
env.IDAM_URL = "https://idam-web-public.aat.platform.hmcts.net"
env.S2S_URL = "http://rpe-service-auth-provider-aat.service.core-compute-aat.internal"
env.PACT_BROKER_FULL_URL = 'https://pact-broker.platform.hmcts.net'
env.CCD_URL = "http://ccd-data-store-api-aat.service.core-compute-aat.internal"
enableAksStagingDeployment()
disableLegacyDeployment()
loadVaultSecrets(secrets)
afterAlways('functionalTest:preview') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
afterAlways('functionalTest:aat') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
enableSlackNotifications('#ia-tech')
onMaster() {
enablePactAs([AppPipelineDsl.PactRoles.CONSUMER])
}
onPR() {
enablePactAs([AppPipelineDsl.PactRoles.CONSUMER])
}
}