-
Notifications
You must be signed in to change notification settings - Fork 15
/
Jenkinsfile_CNP
71 lines (59 loc) · 2.5 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
62
63
64
65
66
67
68
69
70
71
#!groovy
import uk.gov.hmcts.contino.AppPipelineDsl
@Library("Infrastructure")
def product = "cmc"
def component = "claim-store"
def branchesToSync = ['demo', 'perftest', 'ithc']
def secrets = [
// these are required for our integration tests container (initialised in Jenkins)
'cmc-${env}': [
secret('citizen-oauth-client-secret', 'OAUTH2_CLIENT_SECRET'),
secret('smoke-test-citizen-username', 'SMOKE_TEST_CITIZEN_USERNAME'),
secret('smoke-test-solicitor-username', 'SMOKE_TEST_SOLICITOR_USERNAME'),
secret('smoke-test-user-password', 'SMOKE_TEST_USER_PASSWORD'),
secret('generated-user-email-pattern', 'GENERATED_USER_EMAIL_PATTERN')
],
// below is just for CCD in AKS - to be cleaned up when CCD Helm chart is updated to use flexvolume for secrets
'ccd-${env}': [
secret('ccd-data-s2s-secret', 'DATA_STORE_S2S_KEY'),
secret('ccd-definition-s2s-secret', 'DEFINITION_STORE_S2S_KEY'),
secret('ccd-admin-web-oauth2-client-secret', 'ADMIN_WEB_IDAM_SECRET'),
secret('idam-data-store-client-secret','IDAM_OAUTH2_DATA_STORE_CLIENT_SECRET'),
secret('idam-data-store-system-user-username','IDAM_DATA_STORE_SYSTEM_USER_USERNAME'),
secret('idam-data-store-system-user-password','IDAM_DATA_STORE_SYSTEM_USER_PASSWORD')
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[$class : 'AzureKeyVaultSecret',
secretType : 'Secret',
name : secretName,
version : '',
envVariable: envVar
]
}
// Vars needed for AKS testing
env.FRONTEND_BASE_URL = 'https://moneyclaims.aat.platform.hmcts.net'
env.IDAM_API_URL = 'https://idam-api.aat.platform.hmcts.net'
env.IDAM_WEB_URL = 'https://idam-web-public.aat.platform.hmcts.net'
env.S2S_URL = 'http://rpe-service-auth-provider-aat.service.core-compute-aat.internal'
env.PDF_SERVICE_URL = 'http://cmc-pdf-service-aat.service.core-compute-aat.internal'
env.PACT_BROKER_FULL_URL = "https://pact-broker.platform.hmcts.net"
env.PACT_BROKER_URL = "pact-broker.platform.hmcts.net"
env.PACT_BROKER_PORT = "443"
env.PACT_BROKER_SCHEME = "https"
String notificationsChannel = '#cmc-tech-notification'
withPipeline("java", product, component) {
enableSlackNotifications(notificationsChannel)
enableAksStagingDeployment()
disableLegacyDeployment()
syncBranchesWithMaster(branchesToSync)
onMaster {
loadVaultSecrets(secrets)
enablePactAs([AppPipelineDsl.PactRoles.PROVIDER])
}
onPR {
env.ENVIRONMENT = "preview"
env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
loadVaultSecrets(secrets)
}
}