forked from hmcts/em-native-pdf-annotator-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_nightly
71 lines (59 loc) · 2.37 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
#!groovy
properties([
[
$class: 'GithubProjectProperty',
displayName: 'Evidence Management Store App',
projectUrlStr: 'https://github.com/hmcts/rpa-native-pdf-annotator-app'
],
pipelineTriggers([cron('H 21 * * *')]), // scheduling to trigger jenkins job.
parameters([
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 = "em"
def component = "npa"
def secrets = [
's2s-${env}': [
secret('microservicekey-em-gw', 'FUNCTIONAL_TEST_CLIENT_S2S_TOKEN')
],
'rpa-${env}': [
secret('show-oauth2-token', 'FUNCTIONAL_TEST_CLIENT_OAUTH_SECRET')
]
]
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_BASE_URI = 'https://idam-api.aat.platform.hmcts.net'
env.OPEN_ID_API_BASE_URI = 'https://idam-web-public.aat.platform.hmcts.net/o'
env.OIDC_ISSUER_BASE_URI = 'https://forgerock-am.service.core-compute-idam-aat.internal:8443/openam/oauth2/hmcts'
env.S2S_BASE_URI = 'http://rpe-service-auth-provider-aat.service.core-compute-aat.internal'
env.IDAM_WEBSHOW_WHITELIST = 'https://em-show-aat.service.core-compute-aat.internal/oauth2/callback'
env.DM_STORE_APP_URL = 'http://dm-store-aat.service.core-compute-aat.internal'
env.EM_ANNO_APP_URL = 'http://em-anno-aat.service.core-compute-aat.internal'
env.TEST_URL = "http://em-npa-aat.service.core-compute-aat.internal"
overrideVaultEnvironments(vaultOverrides)
loadVaultSecrets(secrets)
enableFortifyScan('em-npa-aat')
enableMutationTest()
enableFullFunctionalTest()
enableSecurityScan()
enableSlackNotifications('#em-dev-chat')
after('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
}