forked from hmcts/document-management-store-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_nightly
74 lines (63 loc) · 2.41 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
64
65
66
67
68
69
70
71
72
73
74
#!groovy
properties([
[
$class: 'GithubProjectProperty',
displayName: 'Document Management Store API',
projectUrlStr: 'https://github.com/hmcts/document-management-store-app'
],
pipelineTriggers([cron('H 8 * * 1-5')]), // scheduling to trigger jenkins job.
parameters([
string(name: 'URL_TO_TEST', defaultValue: 'http://dm-store-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 = "dm"
def component = "store"
def secrets = [
's2s-${env}': [
secret('microservicekey-em-gw', 'S2S_TOKEN'),
secret('microservicekey-ccd-case-disposer', 'CCD_CASE_DISPOSER_S2S_TOKEN')
],
'dm-${env}': [
secret('dm-store-storage-account-primary-connection-string', 'STORAGEACCOUNT_PRIMARY_CONNECTION_STRING')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
def vaultOverrides = [
'preview' : 'aat',
'spreview': 'saat'
]
withNightlyPipeline(type, product, component) {
// Vars for Kubernetes
env.IDAM_API_URL = "https://idam-api.aat.platform.hmcts.net"
env.S2S_URL = "http://rpe-service-auth-provider-aat.service.core-compute-aat.internal"
env.TEST_URL = "http://dm-store-aat.service.core-compute-aat.internal"
env.MP4_52MB = "e58a9fa5-4f6f-438f-b44a-8c0877e945d0/binary"
env.MP4_111MB = "50f9dd86-1615-461d-bca8-e437103dd734/binary"
loadVaultSecrets(secrets)
overrideVaultEnvironments(vaultOverrides)
enableFortifyScan('dm-aat')
// after('fullFunctionalTest') {
// steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
// steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'build/reports/**/*'
// }
//
enableFullFunctionalTest()
enableMutationTest()
enableSecurityScan()
enableSlackNotifications('#em-dev-chat')
afterAlways('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
}