mirror of
https://github.com/chillout2k/sos-milter.git
synced 2025-12-15 19:29:45 +00:00
Jenkins parameterized
This commit is contained in:
parent
33dd8ec7b2
commit
f0382262e2
@ -1,6 +1,6 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
environment {
|
environment {
|
||||||
imageObject = ''
|
dockerImage = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
agent any
|
agent any
|
||||||
@ -12,7 +12,7 @@ pipeline {
|
|||||||
/* This builds the actual image; synonymous to
|
/* This builds the actual image; synonymous to
|
||||||
* docker build on the command line */
|
* docker build on the command line */
|
||||||
script {
|
script {
|
||||||
imageObject = docker.build(env.imageName)
|
dockerImage = docker.build("${env.imageName}:${env.GIT_LOCAL_BRANCH}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -22,7 +22,7 @@ pipeline {
|
|||||||
/* Ideally, we would run a test framework against our image.
|
/* Ideally, we would run a test framework against our image.
|
||||||
* For this example, we're using a Volkswagen-type approach ;-) */
|
* For this example, we're using a Volkswagen-type approach ;-) */
|
||||||
script {
|
script {
|
||||||
imageObject.inside {
|
dockerImage.inside {
|
||||||
sh 'echo "Tests passed"'
|
sh 'echo "Tests passed"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
docker.withRegistry(env.dockerRegistry) {
|
docker.withRegistry(env.dockerRegistry) {
|
||||||
imageObject.push()
|
dockerImage.push()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user