-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJenkinsfile_nightly
63 lines (52 loc) · 2.18 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 07 * * 1-5')]),
parameters([
string(name: 'URL_TO_TEST', defaultValue: 'http://sscs-bulk-scan-aat.service.core-compute-aat.internal', description: 'The URL you want to run these tests against'),
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 type = "java"
def product = "sscs"
def component = "bulk-scan"
def secrets = [
'sscs-bulk-scan-${env}' : [
secret('sscs-s2s-secret', 'S2S_SECRET'),
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'),
]
]
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 = "http://sscs-bulk-scan-aat.service.core-compute-aat.internal"
env.Rules = params.SecurityRules
loadVaultSecrets(secrets)
// Vars needed for AKS testing
env.IDAM_S2S_AUTH = "http://rpe-service-auth-provider-aat.service.core-compute-aat.internal"
env.IDAM_URL = "https://idam-api.aat.platform.hmcts.net"
env.IDAM_OAUTH2_REDIRECT_URL = "https://evidence-sharing-preprod.sscs.reform.hmcts.net"
env.CORE_CASE_DATA_API_URL = "http://ccd-data-store-api-aat.service.core-compute-aat.internal"
env.DOCUMENT_MANAGEMENT_URL = 'http://dm-store-aat.service.core-compute-aat.internal'
env.IDAM_OAUTH2_CLIENT_ID = "sscs"
env.IDAM_S2S_AUTH_MICROSERVICE = "sscs_bulkscan"
enableFortifyScan()
enableMutationTest()
enableSecurityScan()
enableFullFunctionalTest()
enableSlackNotifications('#sscs-tech')
afterSuccess('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
}