-
Notifications
You must be signed in to change notification settings - Fork 10
/
Jenkinsfile_nightly
63 lines (54 loc) · 2.39 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
#!groovy
properties([
pipelineTriggers([cron('35 07 * * 1-5')]),
parameters([
string(name: 'ENVIRONMENT', defaultValue: 'aat', description: 'Environment to test'),
string(name: 'XUI_URL_TO_TEST', defaultValue: 'https://manage-case.aat.platform.hmcts.net', description: 'The URL you want to run both solicitor and caseworker tests against'),
string(name: 'URL_TO_TEST', defaultValue: 'https://probate-back-office-aat.service.core-compute-aat' +
'.internal', description: 'The URL you want to run these tests against'),
string(name: 'SecurityRules',
defaultValue: 'https://raw.githubusercontent.com/hmcts/security-test-rules/master/conf/security-rules.conf',
description: 'The URL you want to run these tests against'),
])
])
@Library("Infrastructure") _
String product = "probate"
String component = "back-office"
def secrets = [
'probate-aat': [
secret('cwUserEmail', 'CW_USER_EMAIL'),
secret('cwUserPass', 'CW_USER_PASSWORD'),
secret('solicitorUserEmail', 'SOL_USER_EMAIL'),
secret('solicitorUserPass', 'SOL_USER_PASSWORD'),
secret('solicitor2UserEmail', 'SOL2_USER_EMAIL'),
secret('solicitor2UserPass', 'SOL2_USER_PASSWORD')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
withNightlyPipeline("nodejs", product, component) {
env.TEST_E2E_URL = params.XUI_URL_TO_TEST
env.TEST_URL = params.URL_TO_TEST
env.Rules = params.SecurityRules
loadVaultSecrets(secrets)
enableFullFunctionalTest(120)
enableSecurityScan()
enableFortifyScan('probate-aat')
// enableCrossBrowserTest(['chrome', 'firefox', 'safari', 'microsoft'])
afterAlways('fullFunctionalTest') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'functional-output/**/*'
}
afterAlways('crossBrowserTest') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'functional-output/**/*'
}
afterSuccess('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
// enableSlackNotifications('#probate-jenkins') // can be turned back on once the overnight functionality is working fully
}