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 { pipeline {
environment { environment {
imageObject = '' imageObject = ''
imageName = 'jenkins/sos-milter'
dockerRegistry = 'https://dockreg-fra.zwackl.de'
} }
agent any agent any
@ -14,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(imageName) imageObject = docker.build(${env.imageName})
} }
} }
} }
@ -34,9 +32,9 @@ pipeline {
stage('Push image') { stage('Push image') {
steps { steps {
script { script {
/* docker.withRegistry(dockerRegistry) {*/ docker.withRegistry(${env.dockerRegistry}) {
imageObject.push() imageObject.push()
/* }*/ }
} }
} }
} }