forked from hmcts/sscs-hearings-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_CNP
61 lines (50 loc) · 1.79 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
55
56
57
58
59
60
61
#!groovy
@Library("Infrastructure")
import java.lang.Object
import uk.gov.hmcts.contino.AppPipelineDsl
def type = "java"
def product = "sscs"
def component = "hearings-api"
def branchesToSync = ['demo']
def vaultOverrides = [
'preview' : 'aat'
]
def secrets = [
'sscs-${env}' : [
secret('idam-s2s-api', 'IDAM_S2S_URL'),
secret('caseworker-ref-api', 'CASEWORKER_REF_API_URL'),
secret('idam-api', 'IDAM_API_URL'),
secret('ccd-api', 'CORE_CASE_DATA_API_URL'),
secret('judicial-ref-api', 'JUDICIAL_REF_API_URL'),
secret('idam-sscs-systemupdate-user', 'IDAM_SSCS_SYSTEMUPDATE_USER'),
secret('idam-sscs-systemupdate-password', 'IDAM_SSCS_SYSTEMUPDATE_PASSWORD'),
secret('sscs-s2s-secret', 'IDAM_S2S_AUTH_TOTP_SECRET'),
secret('s2s-micro', 'IDAM_S2S_AUTH_MICROSERVICES'),
secret('AppInsightsInstrumentationKey', 'APPINSIGHTS_INSTRUMENTATION_KEY'),
secret('common-ref-data-api', 'COMMON_REF_API_URL')
],
's2s-${env}' : []
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
withPipeline(type, product, component) {
overrideVaultEnvironments(vaultOverrides)
loadVaultSecrets(secrets)
//Disabling until mutation tests added.
//enableMutationTest()
syncBranchesWithMaster(branchesToSync)
// Disabled until tests are available
env.PACT_BROKER_FULL_URL = 'https://pact-broker.platform.hmcts.net'
enablePactAs([
AppPipelineDsl.PactRoles.CONSUMER
// It requires the provider tests to be available
//Will re-enable when provider tests are available
//AppPipelineDsl.PactRoles.CONSUMER_DEPLOY_CHECK
])
}