generated from hmcts/ia-task-configuration
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile_nightly
94 lines (83 loc) · 3.56 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
83
84
85
86
87
88
89
90
91
92
93
#!groovy
properties([
pipelineTriggers([cron('H 13 * * 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: 'CIVIL_GENERAL_APPLICATIONS_URL', defaultValue: 'http://civil-general-applications-aat.service.core-compute-aat.internal',
description: 'The URL of GA service'),
string(name: 'WA_TASK_MGMT_API', defaultValue: 'http://wa-task-management-api-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')
])
])
@Library("Infrastructure")
def type = "java"
def product = "civil"
def component = "task-configuration"
def s2sServiceName = "wa_camunda_pipeline_upload"
def ccdBranch = "master"
def yarnBuilder = new uk.gov.hmcts.contino.YarnBuilder(this)
static Map<String, Object> secret(String secretName, String envVariable) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
envVariable: envVariable
]
}
def secrets = [
's2s-${env}': [
secret('microservicekey-xui-webapp', 'XUI_S2S_SECRET'),
],
'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')
]
]
withNightlyPipeline(type, product, component) {
env.TEST_URL = params.CIVIL_SERVICE_URL
env.NIGHTLY_RUN = true
env.TEST_EA_COURTS = true
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.CIVIL_GENERAL_APPLICATIONS_URL = params.CIVIL_GENERAL_APPLICATIONS_URL
env.WAIT_FOR_TIMEOUT_MS = params.WAIT_FOR_TIMEOUT_MS
env.WA_TASK_MGMT_URL = params.WA_TASK_MGMT_API
env.TESTS_FOR_ACCESSIBILITY = false
env.RUN_WA_API_TEST = true
overrideVaultEnvironments([
'aat': params.ENVIRONMENT
])
loadVaultSecrets(secrets)
enableFullFunctionalTest(200)
before('fullFunctionalTest') {
sh """
./bin/pull-latest-civil-ccd-files.sh ${ccdBranch}
"""
yarnBuilder.yarn('yarn-update')
yarnBuilder.yarn('install-dependencies')
yarnBuilder.yarn('playwright install')
}
afterAlways('fullFunctionalTest') {
archiveArtifacts allowEmptyArchive: true, artifacts: 'test-results/functional/**/*'
}
}