-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_parameterized
35 lines (31 loc) · 1.11 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
#!groovy
@Library(value="Infrastructure", changelog=false)
List<LinkedHashMap<String, Object>> apiTestSecrets = [
secret('test-client-key-store', 'TEST_CLIENT_KEY_STORE'),
secret('test-client-key-store-password', 'TEST_CLIENT_KEY_STORE_PASSWORD'),
secret('test-client-subscription-key', 'TEST_CLIENT_SUBSCRIPTION_KEY')
]
static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
[ $class: 'AzureKeyVaultSecret',
secretType: 'Secret',
name: secretName,
version: '',
envVariable: envVar
]
}
properties([
parameters([
string(name: 'PRODUCT_NAME', defaultValue: 'toffee', description: ''),
string(name: 'APP', defaultValue: 'frontend', description: ''),
string(name: 'TYPE', defaultValue: 'nodejs', description: ''),
]),
[$class: 'GithubProjectProperty', projectUrlStr: 'github.com/contino/cnp-plum-frontend '],
pipelineTriggers([[$class: 'GitHubPushTrigger']])
])
withParameterizedPipeline(params.TYPE, params.PRODUCT_NAME, params.APP, 'sbox', 'sbox') {
//enableApiGatewayTest()
disableLegacyDeployment()
onNonPR() {
//loadVaultSecrets(apiTestSecrets)
}
}