-
Notifications
You must be signed in to change notification settings - Fork 10
/
Jenkinsfile_nightly
81 lines (70 loc) · 3.05 KB
/
Jenkinsfile_nightly
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
#!groovy
properties([
pipelineTriggers([cron('H 07 * * 1-5')]),
parameters([
string(name: 'ENVIRONMENT', defaultValue: 'aat', description: 'Environment to test'),
string(name: 'FRONTEND_URL', defaultValue: 'https://manage-case.aat.platform.hmcts.net',
description: 'The URL you want to run the full functional tests against'),
string(name: 'IDAM_API_URL', defaultValue: 'https://idam-api.aat.platform.hmcts.net',
description: 'The URL of idam api'),
string(name: 'DM_STORE_URL', defaultValue: 'http://dm-store-aat.service.core-compute-aat.internal',
description: 'The URL of dm store'),
string(name: 'SERVICE_AUTH_PROVIDER_API_BASE_URL', defaultValue: 'http://rpe-service-auth-provider-aat.service.core-compute-aat.internal',
description: 'The URL of service auth provider'),
string(name: 'CCD_DATA_STORE_URL', defaultValue: 'http://ccd-data-store-api-aat.service.core-compute-aat.internal',
description: 'The URL of ccd data store'),
string(name: 'CIVIL_SERVICE_URL', defaultValue: 'http://civil-service-aat.service.core-compute-aat.internal',
description: 'The URL of civil service'),
string(name: 'WAIT_FOR_TIMEOUT_MS',
defaultValue: '120000',
description: 'Functional tests waitForTimeout value'),
string(name: 'SECURITY_RULES',
defaultValue: 'https://raw.githubusercontent.com/hmcts/security-test-rules/master/conf/security-rules.conf',
description: 'The security rules to use')
])
])
@Library("Infrastructure")
def type = "nodejs"
def product = "civil"
def component = "ccd"
static Map<String, Object> secret(String secretName, String envVariable) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
envVariable: envVariable
]
}
def secrets = [
'civil-${env}': [
secret('microservicekey-civil-service', 'S2S_SECRET'),
secret('default-password', 'DEFAULT_PASSWORD'),
secret('judge-default-password', 'JUDGE_DEFAULT_PASSWORD'),
secret('iac-default-password', 'IAC_DEFAULT_PASSWORD'),
secret('system-update-user-password', 'SYSTEM_USER_PASSWORD')
]
]
withNightlyPipeline(type, product, component) {
env.TEST_URL = params.CIVIL_SERVICE_URL
env.URL = params.FRONTEND_URL
env.DM_STORE_URL=params.DM_STORE_URL
env.IDAM_API_URL=params.IDAM_API_URL
env.SERVICE_AUTH_PROVIDER_API_BASE_URL = params.SERVICE_AUTH_PROVIDER_API_BASE_URL
env.CCD_DATA_STORE_URL = params.CCD_DATA_STORE_URL
env.CIVIL_SERVICE_URL = params.CIVIL_SERVICE_URL
env.WAIT_FOR_TIMEOUT_MS = params.WAIT_FOR_TIMEOUT_MS
env.URL_FOR_SECURITY_SCAN = params.CIVIL_SERVICE_URL
env.TESTS_FOR_ACCESSIBILITY = false
env.CCD_UI_TESTS = true
overrideVaultEnvironments([
'aat': params.ENVIRONMENT
])
loadVaultSecrets(secrets)
enableCrossBrowserTest()
afterAlways('crossBrowserTest') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'test-results/functional/**/*'
}
enableFullFunctionalTest(200)
afterAlways('fullFunctionalTest') {
archiveArtifacts allowEmptyArchive: true, artifacts: 'test-results/functional/**/*'
}
}