Jenkins parameterized

This commit is contained in:
Dominik Chilla 2019-06-13 21:45:04 +02:00
parent 1f9cce63ca
commit 0fb8d45838

View File

@ -1,8 +1,6 @@
pipeline {
environment {
imageObject = ''
imageName = 'jenkins/sos-milter'
dockerRegistry = 'https://dockreg-fra.zwackl.de'
}
agent any
@ -14,7 +12,7 @@ pipeline {
/* This builds the actual image; synonymous to
* docker build on the command line */
script {
imageObject = docker.build(imageName)
imageObject = docker.build(${env.imageName})
}
}
}
@ -34,9 +32,9 @@ pipeline {
stage('Push image') {
steps {
script {
/* docker.withRegistry(dockerRegistry) {*/
docker.withRegistry(${env.dockerRegistry}) {
imageObject.push()
/* }*/
}
}
}
}