forked from hmcts/cmc-ccd-e2e-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_nightly
82 lines (74 loc) · 4 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
81
82
#!groovy
properties([
pipelineTriggers([cron('8 08 * * 1-5')]),
parameters([
string(name: 'ENVIRONMENT', defaultValue: 'aat', description: 'Environment to test'),
string(name: 'WORKERS', defaultValue: '5', description: 'Number of workers'),
string(name: 'RUN_FULL_REGRESSION_SUITE', defaultValue: 'NO', description: 'Environment to test'),
string(name: 'ExUI_URL_TO_TEST', defaultValue: 'https://manage-case.aat.platform.hmcts.net/', description: 'The exui URL you want to run cmc end to end tests against'),
string(name: 'CMC_URL_TO_TEST', defaultValue: 'https://moneyclaims.aat.platform.hmcts.net/', description: 'The cmc citizen frontend URL you want to run cmc end to end tests against'),
string(name: 'IDAM_WEB_URL', defaultValue: 'https://idam-web.aat.platform.hmcts.net', description: 'The URL of idam web'),
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: 'CLAIM_STORE_URL', defaultValue: 'http://cmc-claim-store-aat.service.core-compute-aat.internal', description: 'Claim store url')
])
])
@Library("Infrastructure") _
String product = "cmc"
String component = "ccd-e2e-tests"
def secrets = [
'cmc-aat': [
secret('cmc-caseworker-test-username', 'CW_USER_EMAIL'),
secret('cmc-caseworker-password', 'CW_USER_PASSWORD'),
secret('cmc-caseworker-user-id', 'CW_USER_ID'),
secret('cmc-la-username', 'LA_USER_EMAIL'),
secret('cmc-la-password', 'LA_USER_PASSWORD'),
secret('cmc-la-user-id', 'LA_USER_ID'),
secret('cmc-judge-username', 'JUDGE_USER_EMAIL'),
secret('cmc-judge-password', 'JUDGE_USER_PASSWORD'),
secret('cmc-judge-user-id', 'JUDGE_USER_ID'),
secret('smoke-test-user-password', 'SMOKE_TEST_USER_PASSWORD'),
secret('s2s-microservicekey-cmc', 'S2S_MICROSERVICE_KEY_CMC'),
secret('cmc-s2s-secret', 'S2S_MICROSERVICE_KEY_PWD'),
secret('launchDarkly-sdk-key', 'LAUNCHDARKLY_KEY')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
withNightlyPipeline("nodejs", product, component) {
env.EXUI_URL = params.ExUI_URL_TO_TEST
env.CITIZEN_APP_URL = params.CMC_URL_TO_TEST
env.DM_STORE_URL=params.DM_STORE_URL
env.IDAM_API_URL=params.IDAM_API_URL
env.IDAM_WEB_URL=params.IDAM_WEB_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.CLAIM_STORE_URL = params.CLAIM_STORE_URL
env.TEST_ENV = params.ENVIRONMENT
env.RUN_FULL_REGRESSION_SUITE = params.RUN_FULL_REGRESSION_SUITE
env.WORKERS = params.WORKERS
loadVaultSecrets(secrets)
enableFullFunctionalTest(120)
afterAlways('fullFunctionalTest') {
publishHTML([
allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: "playwright-report",
reportFiles: 'index.html',
reportName: 'Full Functional Test Report'
])
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'reports/tests-results/*'
}
afterAlways('crossBrowserTest') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'functional-output/**/*'
}
}