如何通过Jenkins和Jfrog Artifactory推送和推广Docker镜像

huangapple go评论72阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年5月28日 15:02:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/76350323.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定