forked from hmcts/bulk-scan-ccd-event-handler-sample-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile_CNP
54 lines (43 loc) · 1.32 KB
/
Jenkinsfile_CNP
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
#!groovy
@Library("Infrastructure")
import uk.gov.hmcts.contino.GradleBuilder
def type = "java"
def product = "bulk-scan"
def component = "sample-app"
def channel = '#bsp-build-notices'
GradleBuilder builder = new GradleBuilder(this, product)
def secrets = [
's2s-${env}': [
secret('microservicekey-bulk-scan-sample-app-tests', 'TEST_S2S_SECRET')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
withPipeline(type, product, component) {
before('smoketest:preview') {
withAksClient('nonprod') {
// Vars needed for AKS testing
env.TEST_S2S_NAME = 'bulk_scan_sample_app_tests'
env.TEST_S2S_URL = 'http://rpe-service-auth-provider-aat.service.core-compute-aat.internal'
env.S2S_NAME = 'bulk_scan_ccd_sample_app'
env.S2S_URL = 'http://rpe-service-auth-provider-aat.service.core-compute-aat.internal'
env.CORE_CASE_DATA_API_URL = 'http://ccd-data-store-api-aat.service.core-compute-aat.internal'
}
}
after('test') {
builder.gradle('integration')
}
after('smoketest:aat') {
sh "rm -rf infrastructure/"
}
enableDockerBuild()
installCharts()
enableSlackNotifications(channel)
loadVaultSecrets(secrets)
}