forked from moravianlibrary/s2i-kramerius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
27 lines (23 loc) · 920 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
node {
stage('Build Images'){
dir("${env.WORKSPACE}") {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/achmelo/s2i-kramerius.git']]])
sh 'docker login --username admin --password admin harbor.nkp.cz:30004'
sh 's2i build --incremental=true --exclude="" https://github.com/ceskaexpedice/kramerius.git harbor.nkp.cz:30004/library/kramerius-builder:0.0.1 kramerius -r v5.5.0'
}
}
stage('Push') {
sh """
docker tag kramerius:latest harbor.nkp.cz:30004/library/kramerius:latest
docker push harbor.nkp.cz:30004/library/kramerius:latest
"""
}
stage('Deploy') {
dir("kubernetes-conf"){
sh """
export KUBECONFIG=/var/jenkins_home/admin.conf
kubectl replace --force -f kramerius.yaml
"""
}
}
}