-
Story
-
Resolution: Not A Defect
-
Minor
-
None
From (-- and -JENKINS-39684-) we can now use the agent to pull from other registries with credentials:JENKINS-40524
agent {
dockerfile {
registryUrl 'https://myregistry.com/' registryCredentialsId 'myPredefinedCredentialsInJenkins'
}
}
But what is the mechanism to push into a registry upon successful build/test/etc?
You're combining two use cases, I'd say - building an image for deployment purposes and building an image in order to run a stage inside it. If you want to do both, I'd suggest building the image in an earlier stage via sh "docker build..." or similar, then in the stage where you want to run in it, just use the docker agent type with the image tag, and finally do a sh "docker push ..." to push.