From 02c3dc8b336f83e8a4c5a000ff8c92b096795711 Mon Sep 17 00:00:00 2001 From: jenkins-x-bot Date: Tue, 8 Sep 2020 10:54:16 +0800 Subject: [PATCH] Trying to add variables to build --- Jenkinsfile | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fd76e2d..e34362b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,15 +24,19 @@ spec: ) { node(POD_LABEL) { - stage('Build with Kaniko') { - git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-medusa.git', credentialsId: 'jenkins-to-git' - container('kaniko') { - sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/medusa:0.4 --destination=harbor.ervine.dev/public/x86_64/alpine/medusa:0.4.0' + environment { + MEDUSA_VER = '0.4.2' + } + stages { + stage('Build with Kaniko') { + git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-medusa.git', credentialsId: 'jenkins-to-git' + container('kaniko') { + sh "/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/medusa:0.4 --destination=harbor.ervine.dev/public/x86_64/alpine/medusa:v${MEDUSA_VER}" + } + } + stage('Notify gchat') { + hangoutsNotify message: "Medusa ${MEDUSA_VER} on openSUSE Leap 15.2 has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false } } } } - -stage('Notify gchat') { - hangoutsNotify message: "Medusa 0.4.0 on openSUSE Leap 15.2 has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false -}