存在相同的内部版本名称和编号时,如何升级内部版本 [英] How to promote a build when identical build name and numbers exist

查看:67
本文介绍了存在相同的内部版本名称和编号时,如何升级内部版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Artifactory REST API具有用于构建的资源促销,其中包含内部版本名称和内部版本号.我的项目之一是发布三个具有相同内部版本名称和内部版本号的内部版本.当查看回购中的项目时,它们足够鲜明:

The Artifactory REST API has a resource for build promotion, which takes a build name and build number. One of my projects has been posting three builds with identical build names and build numbers. When viewing the projects in the repo they are sufficiently distinct:

  • Myproject
  • Myproject-foo
  • Myproject-no-bar

我希望仅推广其中之一( Myproject-foo ).我可以获取构建运行内部版本名称,但是由于URI匹配,因此无法进一步检查不同的内部版本.我能做些什么来从这些内部版本号中自动进行特定项目的推广,或者是手动单击,检查每个项目并宣传适当的图像的唯一方法?

I am looking to promote just one of these (Myproject-foo). I can get the build runs for the build name, but as the URIs are matching there is no way to examine the different builds further. Is there anything I can do to automate the promotion of a specific project from each of these build numbers, or is manually clicking through, examining each one and promoting the appropriate images the only way?

推荐答案

尽管可能以相同的内部版本名称和内部版本号结尾,但您应避免这种情况,因为这样会更难区分UI和REST中的运行API.从这种情况下,我可以看到,促销REST API将会促销最新的构建运行(并非全部).

Although it's possible to end up with the same build name and build number, you should avoid this situation because it makes it harder to distinguish between runs in UI and REST API. From what I can see in that case the promotion REST API will promote the latest build run (not all of them).

如果您仍然希望这样做,可以查看此插件

If you still want to do that, you can check out this plugin https://github.com/jfrog/artifactory-user-plugins/tree/master/build/promoteWithDeps (which has a wider scope but it accepts an additional parameter buildStartTime to distinguish between build runs)

这篇关于存在相同的内部版本名称和编号时,如何升级内部版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆