From fd6b21a417187739b6769061591a0d5793b942ed Mon Sep 17 00:00:00 2001 From: Dominik Chilla Date: Thu, 13 Jun 2019 22:51:21 +0200 Subject: [PATCH] Jenkins parameterized --- Jenkinsfile.declarative | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile.declarative b/Jenkinsfile.declarative index 04fca42..596fcfa 100644 --- a/Jenkinsfile.declarative +++ b/Jenkinsfile.declarative @@ -9,21 +9,17 @@ pipeline { stage('Build image') { steps { sh '/usr/bin/env' - /* This builds the actual image; synonymous to - * docker build on the command line */ 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') { steps { - /* Ideally, we would run a test framework against our image. - * For this example, we're using a Volkswagen-type approach ;-) */ script { dockerImage.inside { - sh 'echo "Tests passed"' + sh '/usr/bin/env"' } } }