Skip to content

Commit

Permalink
Tag images pushed from master with latest.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Bynum committed Aug 29, 2016
1 parent 63fc4af commit d6b5db4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ node('docker') {
sh 'mv bin/* ../bin/.'
}
stage 'Environment'

def maintainer = maintainer()
def imagename = imagename()
def tag = env.BRANCH_NAME
if(!imagename){

// 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'
}
Expand Down

0 comments on commit d6b5db4

Please sign in to comment.