build: parse args after allocating to node
@@ -744,6 +744,7 @@ def trackCoverage(do_track, cl) {
* @param cl A closure that should be run inside the docker image
*/
def withDockerEnv(image, opts=[], cl) {
+ node(docker_node_label) {
def docker_args = ""
if (opts.contains(DOCKER_OPTS.MOUNT_MIRROR)) {
docker_args += "-v ${env.HOME}/git_mirrors:/home/jenkins/git_mirrors "
@@ -751,7 +752,6 @@ def withDockerEnv(image, opts=[], cl) {
if (opts.contains(DOCKER_OPTS.PTRACE)) {
docker_args += "--cap-add SYS_PTRACE "
}
- node(docker_node_label) {
docker.withRegistry("https://${registry}",
'docker-hub-elektra-jenkins') {
timeout(activity: true, time: 5, unit: 'MINUTES') {
