Skip to content

Commit

Permalink
Generate the latest docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Valsecchi committed Jun 9, 2017
1 parent 4064c0e commit 8927453
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,15 @@ dockerBuild {
}
}
}

if (env.BRANCH_NAME == 'master') {
stage("publish latest on docker hub") {
withCredentials([[$class : 'UsernamePasswordMultiBinding', credentialsId: 'dockerhub',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
sh 'docker login -u "$USERNAME" -p "$PASSWORD"'
docker.image('camptocamp/c2cwsgiutils:latest').push()
sh 'rm -rf ~/.docker*'
}
}
}
}

0 comments on commit 8927453

Please sign in to comment.