-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile_CNP
101 lines (81 loc) · 4.32 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!groovy
properties([
[$class: 'GithubProjectProperty', projectUrlStr: 'https://github.com/hmcts/ia-case-documents-api.git'],
pipelineTriggers([[$class: 'GitHubPushTrigger']]),
parameters([
string(name: 'IA_AIP_FRONTEND_URL', defaultValue: 'https://immigration-appeal.aat.platform.hmcts.net/', description: 'The AIP frontend URL that will be included in personalisation')
])
])
@Library("Infrastructure")
def type = "java"
def product = "ia"
def component = "case-documents-api"
def secrets = [
'ia-${env}': [
secret('test-caseofficer-username', 'TEST_CASEOFFICER_USERNAME'),
secret('test-caseofficer-password', 'TEST_CASEOFFICER_PASSWORD'),
secret('test-law-firm-a-username', 'TEST_LAW_FIRM_A_USERNAME'),
secret('test-law-firm-a-password', 'TEST_LAW_FIRM_A_PASSWORD'),
secret('test-adminofficer-username', 'TEST_ADMINOFFICER_USERNAME'),
secret('test-adminofficer-password', 'TEST_ADMINOFFICER_PASSWORD'),
secret('test-citizen-username', 'TEST_CITIZEN_USERNAME'),
secret('test-citizen-password', 'TEST_CITIZEN_PASSWORD'),
secret('test-judge-x-username', 'TEST_JUDGE_X_USERNAME'),
secret('test-judge-x-password', 'TEST_JUDGE_X_PASSWORD'),
secret('em-stitching-enabled', 'IA_EM_STITCHING_ENABLED'),
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('launch-darkly-sdk-key', 'LAUNCH_DARKLY_SDK_KEY'),
secret('ia-config-validator-secret', 'IA_CONFIG_VALIDATOR_SECRET'),
secret('app-insights-connection-string', 'app-insights-connection-string'),
secret('system-username', 'SYSTEM_USERNAME'),
secret('system-password', 'SYSTEM_PASSWORD'),
secret('customer-services-telephone', 'IA_CUSTOMER_SERVICES_TELEPHONE'),
secret('customer-services-email', 'IA_CUSTOMER_SERVICES_EMAIL'),
secret('gov-call-charges-url', 'IA_BAIL_GOV_CALL_CHARGES_URL'),
secret('generic-docker-pact-broker-password', 'GENERIC_DOCKER_PACT_BROKER_YAML_PASS'),
secret('system-username', 'IA_SYSTEM_USERNAME'),
secret('system-password', 'IA_SYSTEM_PASSWORD'),
secret('test-homeoffice-lart-username', 'TEST_HOMEOFFICE_LART_USERNAME'),
secret('test-homeoffice-lart-password', 'TEST_HOMEOFFICE_LART_PASSWORD'),
secret('test-homeoffice-pou-username', 'TEST_HOMEOFFICE_POU_USERNAME'),
secret('test-homeoffice-pou-password', 'TEST_HOMEOFFICE_POU_PASSWORD')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
version : '',
envVariable: envVar
]
}
withPipeline(type, product, component) {
env.IA_AIP_FRONTEND_URL = params.IA_AIP_FRONTEND_URL
env.DOCMOSIS_ENDPOINT = "https://docmosis-development.platform.hmcts.net"
env.IA_IDAM_REDIRECT_URI = "https://ia-case-api-aat.service.core-compute-aat.internal/oauth2/callback"
env.DM_URL = "http://dm-store-aat.service.core-compute-aat.internal"
env.CCD_GW_URL = "http://dm-store-aat.service.core-compute-aat.internal"
env.IDAM_URL = "https://idam-api.aat.platform.hmcts.net"
env.CASE_DOCUMENT_AM_URL = "http://ccd-case-document-am-api-aat.service.core-compute-aat.internal"
env.S2S_URL = "http://rpe-service-auth-provider-aat.service.core-compute-aat.internal"
env.EM_BUNDLER_URL = "http://em-ccd-orchestrator-aat.service.core-compute-aat.internal"
env.EM_BUNDLER_STITCH_URI = "/api/stitch-ccd-bundles"
env.OPEN_ID_IDAM_URL = "https://idam-web-public.aat.platform.hmcts.net"
enableAksStagingDeployment()
disableLegacyDeployment()
loadVaultSecrets(secrets)
afterSuccess('functionalTest:preview') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
afterSuccess('functionalTest:aat') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
afterAlways('test') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/build/reports/tests/**'
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/build/reports/pmd/**'
}
enableSlackNotifications('#ia-tech')
}