-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
40 lines (35 loc) · 843 Bytes
/
Jenkinsfile
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
#!/usr/bin/env groovy
properties([
disableConcurrentBuilds(),
])
def allowed_branch_names = [
'development': 'development',
'search-data-platform': 'development',
'main': 'latest'
]
def deploy_tier = [
'development': 'test',
'main': 'production',
]
def publish = allowed_branch_names.containsKey(env.BRANCH_NAME)
def tag = ""
def tier = ""
if (publish) {
tag = allowed_branch_names[env.BRANCH_NAME]
if (deploy_tier.containsKey(env.BRANCH_NAME)) {
tier = deploy_tier[env.BRANCH_NAME]
}
}
buildDockerImage {
namespace = 'foz'
imageName = 'mango'
imageTag = tag
noPublish = !publish
}
if (tier!="") {
stage("Deploy") {
build job: '/team-faciliteiten-voor-onderzoek/gitea/mango-portal/deploy/', wait: true, parameters: [
[$class: 'StringParameterValue', name: 'Tier', value: tier]
]
}
}