Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Example of using kubernetes workflow to build, tag, push images to the docker registry.
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()
}

kaoruu commented Sep 15, 2016

how to set credentials when pushing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment