forked from hmcts/sscs-tribunals-case-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_nightly
61 lines (53 loc) · 2.25 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 22 * * *')]),
parameters([
string(name: 'URL_TO_TEST', defaultValue: 'http://sscs-tribunals-api-aat.service.core-compute-aat.internal', description: 'The URL you want to run these tests against'),
string(name: 'SecurityRules',
defaultValue: 'https://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 type = "java"
def product = "sscs"
def component = "tribunals-api"
def secrets = [
'sscs-${env}' : [
secret('idam-api', 'IDAM_API_URL'),
secret('idam-oauth-user', 'IDAM_OAUTH2_CLIENT_ID'),
secret('ccd-api', 'CORE_CASE_DATA_API_URL'),
secret('idam-redirect', 'IDAM_OAUTH2_REDIRECT_URL'),
secret('idam-sscs-systemupdate-user', 'IDAM_SSCS_SYSTEMUPDATE_USER'),
secret('idam-sscs-systemupdate-password', 'IDAM_SSCS_SYSTEMUPDATE_PASSWORD'),
secret('idam-sscs-oauth2-client-secret', 'IDAM_OAUTH2_CLIENT_SECRET'),
secret('idam-s2s-api', 'IDAM_S2S_AUTH'),
secret('sscs-s2s-secret', 'IDAM_S2S_AUTH_TOTP_SECRET'),
secret('s2s-micro', 'IDAM_S2S_AUTH_MICROSERVICE'),
secret('docmosis-endpoint', 'PDF_SERVICE_CONVERT_URL'),
secret('docmosis-api-key', 'PDF_SERVICE_ACCESS_KEY'),
secret('AppInsightsInstrumentationKey', 'APPINSIGHTS_INSTRUMENTATIONKEY'),
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
withNightlyPipeline(type, product, component) {
env.TEST_URL = params.URL_TO_TEST
env.Rules = params.SecurityRules
env.TEST_DOCUMENT_MANAGEMENT_URL = 'http://dm-store-aat.service.core-compute-aat.internal'
loadVaultSecrets(secrets)
enableSlackNotifications('#sscs-tech')
enableFortifyScan()
enableSecurityScan()
enableFullFunctionalTest()
enableMutationTest()
after('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
}