Reputation: 155
I am trying to push a public image (confluentic/cp-zookeeper) under a different name into jfrog artifactory using Jenkins, with a Jenkinsfile. I have tried in pulling the image and retagging it but it doesn't work. I currently have one step to push my own dockerfile to the artifact, so I know the pipeline works. any help would be appreciate it
Upvotes: 0
Views: 1010
Reputation: 5027
You should be able to define a stage like...
stage {
steps {
script {
docker.withRegistry(registry, credentials)
{
def dockerImage = docker.build("acme-dockerv2-virtual.jfrog.io/hello-world")
dockerImage.push()
}
}
}
}
Where this assume registry is something like acme-dockerv2-virtual.jfrog.io
, and credentials are whatever you need for artifactory...
Upvotes: 1