-
Notifications
You must be signed in to change notification settings - Fork 11
/
Jenkinsfile_nightly
61 lines (53 loc) · 1.93 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
properties([
pipelineTriggers([cron('H 8 * * 1-5')]),
parameters([
string(name: 'URL_TO_TEST', defaultValue: 'https://moneyclaims.aat.platform.hmcts.net', description: 'The URL you want to run these tests against'),
])
])
@Library("Infrastructure")
def product = "cmc"
def component = "citizen-frontend"
def secrets = [
'cmc-${env}':
[
secret('citizen-oauth-client-secret', 'OAUTH_CLIENT_SECRET'),
secret('smoke-test-citizen-username', 'SMOKE_TEST_CITIZEN_USERNAME'),
secret('smoke-test-user-password', 'SMOKE_TEST_USER_PASSWORD')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
// THESE CAN BE PICKED UP IN INTEGRATION-TEST CODE DIRECTLY
// NOTE: they will not be overridden by terraform outputs - so use AAT settings
env.IDAM_URL = 'https://idam-api.aat.platform.hmcts.net'
env.CLAIM_STORE_URL = 'http://cmc-claim-store-aat.service.core-compute-aat.internal'
env.FEATURE_ADMISSIONS = 'true'
env.FEATURE_DIRECTIONS_QUESTIONNAIRE = 'true'
env.FEATURE_TESTING_SUPPORT = 'true'
env.FEATURE_INVERSION_OF_CONTROL = 'true'
env.FEATURE_PCQ = 'true'
env.FEATURE_BREATHING_SPACE = 'true'
// add any others needed to selective testing...
// SAUCELABS config - configured on Jenkins (also IDAM_URL above used)
env.TEST_URL = params.URL_TO_TEST //required
env.CITIZEN_APP_URL = params.URL_TO_TEST //required
withNightlyPipeline("nodejs", product, component) {
loadVaultSecrets(secrets)
enableFortifyScan()
enableCrossBrowserTest()
enableSecurityScan(scanType: "frontend")
enableFullFunctionalTest(200)
afterSuccess('crossBrowserTest') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'functional-output/**/*'
}
afterSuccess('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
}