mirror of
https://github.com/chillout2k/sos-milter.git
synced 2025-12-11 01:30:19 +00:00
Jenkins multibranch pipeline
This commit is contained in:
parent
0328bd1a6c
commit
2876c35ffa
@ -1,18 +1,15 @@
|
||||
def dockerImage = ''
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
dockerImage = ''
|
||||
imageName = 'sos-milter'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build image') {
|
||||
steps {
|
||||
sh '/usr/bin/env'
|
||||
script {
|
||||
/* Multi-Branch Pipeline works with env.BRANCH_NAME*/
|
||||
dockerImage = docker.build("${env.imageName}:${env.BRANCH_NAME}","--pull --label BUILD_URL=${env.BUILD_URL} .")
|
||||
dockerImage = docker.build("sos-milter:${env.BRANCH_NAME}","--pull --label BUILD_URL=${env.BUILD_URL} .")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -29,9 +26,7 @@ pipeline {
|
||||
stage('Push image') {
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('https://dockreg-fra.zwackl.de') {
|
||||
dockerImage.push()
|
||||
}
|
||||
dockerImage.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -42,3 +37,4 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user