-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile_parameterized
41 lines (32 loc) · 1.13 KB
/
Jenkinsfile_parameterized
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
#!groovy
@Library("Infrastructure") _
def type = "java"
def product = "camunda"
def component = "bpm"
def secrets = [
secret('camunda-enterprise-user', 'ORG_GRADLE_PROJECT_CAMUNDA_NEXUS_USER'),
secret('camunda-enterprise-password', 'ORG_GRADLE_PROJECT_CAMUNDA_NEXUS_PASSWORD'),
]
def vaultSecrets = [
's2s-${env}': [
secret('microservicekey-camunda-bpm', 'S2S_SECRET_CAMUNDA_BPM'),
]
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
withParameterizedPipeline(type, product, component, "sandbox", "sandbox") {
loadVaultSecrets(vaultSecrets)
afterSuccess('checkout') {
withAzureKeyvault( azureKeyVaultSecrets: secrets,
keyVaultURLOverride: 'https://rpe-prod.vault.azure.net') {
env.ORG_GRADLE_PROJECT_CAMUNDA_NEXUS_USER = env.ORG_GRADLE_PROJECT_CAMUNDA_NEXUS_USER
env.ORG_GRADLE_PROJECT_CAMUNDA_NEXUS_PASSWORD = env.ORG_GRADLE_PROJECT_CAMUNDA_NEXUS_PASSWORD
}
}
}