Forked from initcron/docker-build-publish-Jenkinsfile
Created
December 29, 2020 19:18
-
-
Save sanjaygeeky/142dbd3726dcc26611d27908b60d567e to your computer and use it in GitHub Desktop.
Docker Build and Publish Script Snippet for Jenkinsfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker.withRegistry('https://index.docker.io/v1/', 'dockerlogin') { | |
def dockerImage = docker.build("xxxxxx/xxxxx:v${env.BUILD_ID}", "./") | |
dockerImage.push() | |
dockerImage.push("latest") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment