mirror of
https://github.com/chillout2k/sos-milter.git
synced 2025-12-12 18:10:18 +00:00
Jenkins Multi-Branch build
This commit is contained in:
parent
05382b2156
commit
0751c7ba4c
@ -3,6 +3,11 @@ pipeline {
|
||||
dockerImage = ''
|
||||
}
|
||||
|
||||
parameters {
|
||||
string name: 'imageName', trim: false
|
||||
string name: 'dockerRegistry', trim: false
|
||||
}
|
||||
|
||||
agent any
|
||||
|
||||
stages {
|
||||
@ -10,7 +15,8 @@ pipeline {
|
||||
steps {
|
||||
sh '/usr/bin/env'
|
||||
script {
|
||||
dockerImage = docker.build("${env.imageName}:${env.GIT_LOCAL_BRANCH}","--pull --label \\\"GIT_COMMIT=${env.GIT_COMMIT}\\\" --label \\\"BUILD_URL=${env.BUILD_URL}\\\" .")
|
||||
/* Multi-Branch Pipeline works with env.BRANCH_NAME*/
|
||||
dockerImage = docker.build("${env.imageName}:${env.BRANCH_NAME}","--pull --label BUILD_URL=${env.BUILD_URL} .")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -18,7 +24,7 @@ pipeline {
|
||||
stage('Test image') {
|
||||
steps {
|
||||
script {
|
||||
dockerImage.inside { c ->
|
||||
dockerImage.inside {
|
||||
sh '/usr/bin/env'
|
||||
sh '/bin/ps auxwwf'
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user