mirror of
https://github.com/chillout2k/sos-milter.git
synced 2025-12-13 02:20:18 +00:00
Jenkins parameterized
This commit is contained in:
parent
f0382262e2
commit
fd6b21a417
@ -9,21 +9,17 @@ pipeline {
|
|||||||
stage('Build image') {
|
stage('Build image') {
|
||||||
steps {
|
steps {
|
||||||
sh '/usr/bin/env'
|
sh '/usr/bin/env'
|
||||||
/* This builds the actual image; synonymous to
|
|
||||||
* docker build on the command line */
|
|
||||||
script {
|
script {
|
||||||
dockerImage = docker.build("${env.imageName}:${env.GIT_LOCAL_BRANCH}")
|
dockerImage = docker.build("${env.imageName}:${env.GIT_LOCAL_BRANCH}","--pull=true --label GIT_COMMIT=${env.GIT_COMMIT} --label BUILD_URL=${env.BUILD_URL}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Test image') {
|
stage('Test image') {
|
||||||
steps {
|
steps {
|
||||||
/* Ideally, we would run a test framework against our image.
|
|
||||||
* For this example, we're using a Volkswagen-type approach ;-) */
|
|
||||||
script {
|
script {
|
||||||
dockerImage.inside {
|
dockerImage.inside {
|
||||||
sh 'echo "Tests passed"'
|
sh '/usr/bin/env"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user