generated from hmcts/expressjs-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile_nightly
65 lines (50 loc) · 1.83 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([
// 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: 'SPTRIBS_FRONTEND_URL', defaultValue: 'https://sptribs-frontend.aat.platform.hmcts.net/', description: 'The URL you want to run tests against'),
string(name: 'FUNCTIONAL_TESTS_WORKERS',
defaultValue: '2',
description: 'Number of workers running functional tests'),
])
])
@Library("Infrastructure")
import uk.gov.hmcts.contino.AppPipelineConfig
def type = "nodejs"
def product = "sptribs"
def component = "frontend"
// SAUCELABS config - configured on Jenkins
env.SAUCE_USERNAME = 'username'
env.SAUCE_ACCESS_KEY = 'privatekey'
def yarnBuilder = new uk.gov.hmcts.contino.YarnBuilder(this)
static Map<String, Object> secret(String secretName, String envVariable) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
envVariable: envVariable
]
}
def secrets = [
'sptribs-${env}' :[
secret('idam-ui-secret', 'IDAM_SECRET'),
secret('idam-systemupdate-password', 'TEST_PASSWORD'),
secret('citizen-user', 'CITIZEN_USERNAME'),
secret('citizen-password', 'CITIZEN_PASSWORD'),
secret('specialTribunals-cic-pcq-token', 'PCQ_TOKEN')
],
's2s-${env}': [
secret('microservicekey-sptribs-frontend', 'SERVICE_AUTH_SECRET')
]
]
def pipelineConf = new AppPipelineConfig()
pipelineConf.vaultSecrets = secrets
withNightlyPipeline(type, product, component) {
env.TEST_URL = "https://sptribs-frontend.aat.platform.hmcts.net/?edgecaseType=CIC"
env.SPTRIBS_FRONTEND_URL = "https://sptribs-frontend.aat.platform.hmcts.net/"
loadVaultSecrets(secrets)
enableFortifyScan()
afterAlways('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
}