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
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...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.