dockerjenkinsartifactoryjfrog-container-registry

howto push and promote docker image by Jenkins with Jfrog Artifactory


Currently we are using Jenkins to build and push docker images to Artifactory by docker native commands:

docker build -t "my_artificatory_repo/the_image:1.0.0" .
docker push "my_artificatory_repo/the_image:1.0.0"

but it prevents us from using an Artifactory plugin for Jenkins to promote images by a rtAddInteractivePromotion for example.

Is there a way to push docker images using Artifactory plugin so users could release images later just by clicking "promote" in Jenkins build UI?

What is the BKM using Artifactory-Jenkins to build and release docker images?


Solution

  • This Github example JenkinsFile would help in setting up the JFrog Artifactory plugin. You can also refer to this wiki on setting up declarative script for Docker.