From ee27e17ac451f49f858174d7695acdc9c1ed027e Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Fri, 12 Aug 2016 15:04:05 -0400 Subject: [PATCH] Using latest tag for publication instead of master --- Jenkinsfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2dda60c..a09cdea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,15 @@ node { def maintainer = maintainer() def imagename = imagename() - def tag = env.BRANCH_NAME + def tag + + // Tag images created on master branch with 'latest' + if(env.BRANCH_NAME == "master"){ + tag = "latest" + }else{ + tag = env.BRANCH_NAME + } + if(!imagename){ echo "You must define an imagename in common.bash" currentBuild.result = 'FAILURE'