Description

I'm trying to run the following workflow script:

node {
// https://registry.hub.docker.com/_/maven/
def maven32 = docker.image('maven:3.2-jdk-7-onbuild');
stage 'Mirror'
// First make sure the slave has this image.
// (If you could set your registry below to mirror Docker Hub,
// this would be unnecessary as maven32.inside would pull the image.)
maven32.pull()
// We are pushing to a private secure docker registry in this demo.
// 'docker-registry-login' is the username/password credentials ID
// as defined in Jenkins Credentials.
// This is used to authenticate the docker client to the registry.
maven32.withRun() {
stage 'Build'
git url: 'ssh://git@github.com/me/myrepo.git', credentialsId: 'myid'
}
}

stage 'Mirror'
// First make sure the slave has this image.
// (If you could set your registry below to mirror Docker Hub,
// this would be unnecessary as maven32.inside would pull the image.)
maven32.pull()
// We are pushing to a private secure docker registry in this demo.
// 'docker-registry-login' is the username/password credentials ID
// as defined in Jenkins Credentials.
// This is used to authenticate the docker client to the registry.

stage 'Mirror'
// First make sure the slave has this image.
// (If you could set your registry below to mirror Docker Hub,
// this would be unnecessary as maven32.inside would pull the image.)
maven32.pull()
// We are pushing to a private secure docker registry in this demo.
// 'docker-registry-login' is the username/password credentials ID
// as defined in Jenkins Credentials.
// This is used to authenticate the docker client to the registry.