Last active
September 15, 2016 03:06
-
-
Save iocanel/3422fc4546f23256eb49 to your computer and use it in GitHub Desktop.
Example of using kubernetes workflow to build, tag, push images to the docker registry.
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
node { | |
git 'https://github.com/rawlingsj/node-example.git' | |
if (!fileExists ('Dockerfile')) { | |
writeFile file: 'Dockerfile', text: 'FROM node:5.3-onbuild' | |
} | |
kubernetes.image().withName("example").build().fromPath(".") | |
kubernetes.image().withName("example").tag().inRepository("172.30.101.121:5000/default/example").withTag("1.0") | |
kubernetes.image().withName("172.30.101.121:5000/default/example").push().withTag("1.0").toRegistry() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to set credentials when pushing?