mirror of
https://github.com/chillout2k/sos-milter.git
synced 2025-12-12 18:10:18 +00:00
Jenkins scripted multibranch pipeline
This commit is contained in:
parent
2876c35ffa
commit
ad9366ee7b
26
Jenkinsfile.scripted.multibranch
Normal file
26
Jenkinsfile.scripted.multibranch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
node {
|
||||||
|
def dockerImage
|
||||||
|
|
||||||
|
stage('Build image') {
|
||||||
|
sh '/usr/bin/env'
|
||||||
|
/* Multi-Branch Pipeline works with env.BRANCH_NAME*/
|
||||||
|
dockerImage = docker.build("sos-milter:${env.BRANCH_NAME}","--pull --label BUILD_URL=${env.BUILD_URL} .")
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Test image') {
|
||||||
|
dockerImage.inside {
|
||||||
|
sh '/usr/bin/env'
|
||||||
|
sh '/bin/ps auxwwf'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Push image') {
|
||||||
|
docker.withRegistry('https://dockreg-fra.zwackl.de') {
|
||||||
|
dockerImage.push()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Cleanup') {
|
||||||
|
sh 'echo "TODO: cleanup!"'
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user