From da491a4d6cea2a6f0474e04bea682cb364463376 Mon Sep 17 00:00:00 2001 From: Sciocatti Date: Wed, 11 Jan 2023 23:57:01 +0200 Subject: [PATCH] Added export --- cicd/Jenkinsfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cicd/Jenkinsfile b/cicd/Jenkinsfile index 22118ed..7809930 100644 --- a/cicd/Jenkinsfile +++ b/cicd/Jenkinsfile @@ -36,12 +36,12 @@ spec: stage('Docker Build and Push') { steps { container("kaniko") { - sh """ - destinationRegistry=`sed -n 's/^destinationRegistry=\\(.*\\)/\\1/p' < config.conf` - imageName=`sed -n 's/^imageName=\\(.*\\)/\\1/p' < config.conf` - imageTag=`sed -n 's/^imageTag=\\(.*\\)/\\1/p' < config.conf` - /kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination $destinationRegistry/$imageName:$imageTag - """ + sh ''' + export destinationRegistry=`sed -n 's/^destinationRegistry=\\(.*\\)/\\1/p' < config.conf` + export imageName=`sed -n 's/^imageName=\\(.*\\)/\\1/p' < config.conf` + export imageTag=`sed -n 's/^imageTag=\\(.*\\)/\\1/p' < config.conf` + /kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination ${destinationRegistry}/${imageName}:${imageTag} + ''' } } }