Adding tags to docker image from jenkins
As shown in this blog post you can add two tags with the push command like so:
stage('Push image') {
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
}
}
PS Mind you Jenkins folks if you're reading this a 3rd party blog post does NOT count as documentation. This could have been resolved MUCH quicker had this been properly documented.