-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile_nightly
66 lines (56 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
64
65
66
#!groovy
properties([
pipelineTriggers([cron('H 08 * * 1-5')]),
parameters([
string(name: 'URL_TO_TEST', defaultValue: 'https://benefit-appeal.aat.platform.hmcts.net', description: 'The URL you want to run these tests against'),
string(name: 'IDAM_URL', defaultValue: 'https://idam-api.aat.platform.hmcts.net', description: 'The IDAM URL where test accounts get created'),
string(name: 'TRIBUNALS_CASE_API_URL', defaultValue: 'http://sscs-tribunals-api-aat.service.core-compute-aat.internal', description: 'The Tribunal api to view the cases'),
string(name: 'SecurityRules',
defaultValue: 'http://raw.githubusercontent.com/hmcts/security-test-rules/master/conf/security-rules.conf',
description: 'The URL you want to run these tests against'),
])
])
@Library("Infrastructure")
def product = "sscs-tribunals"
def component = "frontend"
def secrets = [
'sscs-${env}': [
secret('idam-sscs-oauth2-client-secret', 'SERVICES_IDAM_SECRET'),
secret('postcode-lookup-token', 'POSTCODE_LOOKUP_TOKEN'),
secret('pcq-token-key', 'SERVICE_TOKEN_KEY')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
withNightlyPipeline("nodejs", product, component) {
loadVaultSecrets(secrets)
env.TEST_URL = params.URL_TO_TEST
env.TRIBUNALS_CASE_API_URL = params.TRIBUNALS_CASE_API_URL
enableCrossBrowserTest(60)
// enableFortifyScan('sscs-aat')
enableFullFunctionalTest(120)
enableMutationTest()
// afterSuccess('fortify-scan') {
// steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
// }
afterSuccess('crossBrowserTest') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'functional-output/**/*'
enableSlackNotifications('#sscs-tech')
}
afterSuccess('fullFunctionalTest') {
publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "output",
reportFiles : "SYA-e2e-result.html",
reportName : "SYA E2E functional tests result"
]
}
}