-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile_nightly
61 lines (51 loc) · 1.95 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
#!groovy
def yarnBuilder = new uk.gov.hmcts.contino.YarnBuilder(this)
properties([
pipelineTriggers([cron('H 07 * * 1-5')]),
parameters([
string(name: 'ENVIRONMENT', defaultValue: 'aat', description: 'Environment to test'),
string(name: 'URL_TO_TEST', defaultValue: 'https://probate.aat.platform.hmcts.net', description: 'The URL you want to run these tests against'),
])
])
@Library("Infrastructure") _
String product = "probate"
String component = "caveats-fe"
def secrets = [
'probate-${env}': [
secret('testIdamBaseUrl', 'IDAM_API_URL'),
secret('testSurvey', 'SURVEY'),
secret('testsurveyEndOfApplication', 'SURVEY_END_OF_APPLICATION'),
secret('testUseGovPay', 'USE_GOV_PAY'),
secret('testValidationServiceUrl', 'TEST_VALIDATION_SERVICE_URL'),
secret('caveat-user-name', 'CAVEAT_USER_EMAIL'),
secret('caveat-user-password', 'CAVEAT_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_URL = params.URL_TO_TEST
env.TEST_E2E_URL = params.URL_TO_TEST
loadVaultSecrets(secrets)
enableFullFunctionalTest()
enableCrossBrowserTest()
enableFortifyScan('probate-aat')
//enableSecurityScan()
afterAlways('build') {
sh 'mkdir -p functional-output'
yarnBuilder.yarn('setup')
}
afterAlways('fullFunctionalTest') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'functional-output/**/*'
}
afterAlways('crossBrowserTest') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'functional-output/**/*'
}
// enableSlackNotifications('#probate-qa') // can be turned back on once the overnight functionality is working fully
}