Last active
July 19, 2016 14:07
-
-
Save jay-johnson/bfcad7c25436d7ac6d2be315edb703f0 to your computer and use it in GitHub Desktop.
nginx Jenkins Pipeline building example
This file contains hidden or 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
stage 'Building nginx Container for Docker Hub' | |
docker.withRegistry("${registry_url}", "${docker_creds_id}") { | |
// Set up the container to build | |
maintainer_name = "jayjohnson" | |
container_name = "django-nginx" | |
stage "Building Container" | |
echo "Building nginx with docker.build(${maintainer_name}/${container_name}:${build_tag})" | |
container = docker.build("${maintainer_name}/${container_name}:${build_tag}", 'nginx') | |
// add more tests | |
stage "Pushing" | |
container.push() | |
currentBuild.result = 'SUCCESS' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment