forked from SeldonIO/seldon-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
38 lines (37 loc) · 1.32 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
pipeline {
parameters {
booleanParam(name: 'IS_DISABLED_APIFE_BUILD', defaultValue: false, description: '')
booleanParam(name: 'IS_DISABLED_ENGINE_BUILD', defaultValue: false, description: '')
booleanParam(name: 'IS_IMAGE_BEING_PUBLISHED', defaultValue: false, description: '')
}
agent {
docker {
image 'seldonio/core-builder:0.3'
args '-v /root/.m2:/root/.m2'
}
}
environment {
SELDON_CORE_DOCKER_HUB_USER = credentials('SELDON_CORE_DOCKER_HUB_USER')
SELDON_CORE_DOCKER_HUB_PASSWORD = credentials('SELDON_CORE_DOCKER_HUB_PASSWORD')
}
stages {
stage('build-engine') {
when {
expression { return params.IS_DISABLED_ENGINE_BUILD == false }
}
steps {
echo "Build Image"
sh 'cd engine && make -f Makefile.ci build'
script {
if (params.IS_IMAGE_BEING_PUBLISHED == true) {
echo "Publish Image"
sh 'cd engine && make -f Makefile.ci repo_login'
sh 'cd engine && make -f Makefile.ci push_image'
} else {
echo "Publish Image [SKIPPED]"
}
}
}
}
}
}