generated from hmcts/expressjs-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathJenkinsfile_nightly
79 lines (67 loc) · 2.82 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
#!groovy
properties([
// H allow predefined but random minute see https://en.wikipedia.org/wiki/Cron#Non-standard_characters
pipelineTriggers([cron('H 8 * * 1-5')]),
parameters([
string(name: 'FRONTEND_URL', defaultValue: 'https://privatelaw.aat.platform.hmcts.net/', description: 'The URL you want to run tests against')
])
])
@Library("Infrastructure")
import uk.gov.hmcts.contino.AppPipelineConfig
def type = "nodejs"
def product = "prl"
def component = "citizen-frontend"
def yarnBuilder = new uk.gov.hmcts.contino.YarnBuilder(this)
// SAUCELABS config - configured on Jenkins
env.SAUCE_USERNAME = 'username'
env.SAUCE_ACCESS_KEY = 'privatekey'
env.SAUCE_TUNNEL_IDENTIFIER = 'reformtunnel'
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
envVariable: envVar
]
}
def secrets = [
'prl-${env}': [
secret('AppInsightsInstrumentationKey', 'APP_INSIGHTS_INSTRUMENTATION_KEY'),
secret('prl-citizen-frontend-idam-client-secret', 'CITIZEN_IDAM_SECRET'),
secret('prl-cos-idam-client-secret', 'COS_API_IDAM_SECRET'),
secret('postcode-lookup-token', 'POSTCODE_TOKEN'),
secret('citizen-upload-docs-email', 'UPLOAD_DOCUMENTS_EMAIL'),
secret('launchDarkly-sdk-key', 'LAUNCH_DARKLY_SDK_KEY'),
secret('microservicekey-prl-citizen-frontend', 'SERVICE_AUTH_SECRET'),
secret('system-update-user-username', 'SYSTEM_UPDATE_USER_USERNAME'),
secret('system-update-user-password', 'SYSTEM_UPDATE_USER_PW'),
secret('citizen-user', 'CITIZEN_USERNAME'),
secret('citizen-password', 'CITIZEN_PW'),
secret('pact-broker-username', 'PACT_BROKER_YAML_USERNAME'),
secret('pact-broker-password', 'PACT_BROKER_YAML_PW'),
secret('prl-pcq-token-key', 'PCQ_TOKEN'),
secret('ccd-datastore-client-id', 'CCD_DATASTORE_client_id'),
secret('ccd-datastore-client-secret', 'CCD_DATASTORE_client_secret'),
secret('ccd-datastore-username', 'CCD_DATASTORE_username'),
secret('ccd-datastore-password', 'CCD_DATASTORE_password')
]
]
def pipelineConf = new AppPipelineConfig()
pipelineConf.vaultSecrets = secrets
withNightlyPipeline(type, product, component) {
env.TEST_URL = "https://privatelaw.aat.platform.hmcts.net/"
env.PRL_CITIZEN_URL = params.FRONTEND_URL
loadVaultSecrets(secrets)
// Tests disabled here as they run in prl-e2e-tests instead
// enableMutationTest()
//enableFullFunctionalTest(200)
//enableCrossBrowserTest(60)
enableFortifyScan()
enableSecurityScan()
afterAlways('test') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'coverage/**/*'
}
afterAlways('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'build/reports/**/*'
}
}