英文:
howto push and promote docker image by Jenkins with Jfrog Artifactory
问题
目前我们正在使用Jenkins通过docker原生命令构建并推送镜像到Artifactory:
docker build -t "my_artificatory_repo/the_image:1.0.0" .
docker push "my_artificatory_repo/the_image:1.0.0"
但这样做会阻止我们使用Jenkins的Artifactory插件来通过 rtAddInteractivePromotion
等方式推广镜像。
是否有一种方式可以使用Artifactory插件来推送docker镜像,以便用户可以稍后在Jenkins构建界面中点击 "promote" 来发布镜像?
在使用Artifactory-Jenkins构建和发布docker镜像时的最佳实践是什么?
英文:
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?
答案1
得分: 1
这个Github示例JenkinsFile可以帮助设置JFrog Artifactory插件。
您还可以参考这个wiki来设置Docker的声明性脚本。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论