We use Jenkins scripted pipelines to build & push docker images... imageName = "someimage" currImage = docker.build("${PRIVATE_REGISTRY}/${imageName}") docker.withRegistry("https://${PRIVATE_REGISTRY}", 'registry_cred_id') { currImage.push() }
Is it possible to set something globally for the *docker* function so we can keep our pipeline files more DRY and not have to repeat some of that? If the docker command knows where I want to push and know which credentials I use it would be awesome Hoping to end up with something like the following... imageName = "someimage" currImage = docker.build("${PRIVATE_REGISTRY}/${imageName}") currImage.push() -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8e03327b-7120-41a0-82e9-1895271cb870%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.