-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
37 lines (33 loc) · 1.06 KB
/
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
node {
checkout scm
def front_image
def back_image
stage("build") {
dir('client') {
docker.withRegistry("https://docker.ossystem.ua") {
front_image = docker.build("monsters/ibitoye-front:${env.BUILD_TAG}", ".")
front_image.push()
}
}
dir('server') {
docker.withRegistry("https://docker.ossystem.ua") {
back_image = docker.build("monsters/ibitoye-back:${env.BUILD_TAG}", ".")
back_image.push()
}
}
}
stage("test images") {
sh "echo everything went fine, why do you worry?"
}
stage("deploy") {
timeout(time: 180, unit: 'SECONDS') {
withEnv([
"FRONT_IMAGE_NAME=docker.ossystem.ua/${front_image.id}",
"BACK_IMAGE_NAME=docker.ossystem.ua/${back_image.id}",
"ENV=${env.BRANCH_NAME}",
]) {
kubernetesDeploy configs: 'kubernetes.yml', kubeconfigId: 'kuber-monsters-kubeconfig'
}
}
}
}