generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile_nightly
57 lines (48 loc) · 1.77 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
#!groovy
properties([
// H allow predefined but random minute see https://en.wikipedia.org/wiki/Cron#Non-standard_characters
pipelineTriggers([cron('H 08 * * 1-5')]),
parameters([
string(name: 'URL_TO_TEST', defaultValue: 'http://wa-workflow-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 = "wa"
def component = "workflow-api"
def secrets = [
'wa-${env}' : [
secret('ld-secret', 'LAUNCH_DARKLY_SDK_KEY'),
],
's2s-${env}': [
secret('microservicekey-wa-workflow-api', 'S2S_SECRET_WORKFLOW_API'),
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
version : '',
envVariable: envVar
]
}
env.TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX = "hmctspublic.azurecr.io/imported/"
withNightlyPipeline(type, product, component) {
env.TEST_URL = params.URL_TO_TEST
env.Rules = params.SecurityRules
env.IDAM_URL = "https://idam-api.aat.platform.hmcts.net"
env.S2S_URL = "http://rpe-service-auth-provider-aat.service.core-compute-aat.internal"
env.CAMUNDA_URL = "http://camunda-api-aat.service.core-compute-aat.internal/engine-rest"
enableSecurityScan()
// enableFortifyScan()
enableMutationTest()
loadVaultSecrets(secrets)
enableFullFunctionalTest()
enableSlackNotifications('#wa-build')
after('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
}