generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile_nightly
49 lines (41 loc) · 1.63 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
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: 'URL_TO_TEST', defaultValue: 'http://sptribs-case-api-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")
import uk.gov.hmcts.contino.GradleBuilder
def type = "java"
def product = "sptribs"
def component = "case-api"
static Map<String, Object> secret(String secretName, String envVariable) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
envVariable: envVariable
]
}
def secrets = [
'sptribs-${env}' :[
secret('idam-secret', 'OAUTH2_CLIENT_SECRET'),
secret('idam-solicitor-username', 'IDAM_SOLICITOR_USERNAME'),
secret('idam-solicitor-password', 'IDAM_SOLICITOR_PASSWORD'),
secret('citizen-user', 'IDAM_CITIZEN_USERNAME'),
secret('citizen-password', 'IDAM_CITIZEN_PASSWORD')
]
]
GradleBuilder builder = new GradleBuilder(this, product)
withNightlyPipeline(type, product, component) {
env.TEST_URL = "http://sptribs-case-api-aat.service.core-compute-aat.internal"
loadVaultSecrets(secrets)
enableSlackNotifications('#special-tribunals-builds')
enableFortifyScan()
afterAlways('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
}