jfrog-cli + github: 从特定(主/默认)分支下载最新的构件

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

jfrog-cli + github: download latest artifacts from specific (main/default) branch

问题

我们想要在GitHub上运行定期构建,使用存储在Artifactory中的构建产物。

我可以使用 jf rt dl --build "Action Name" --flat 命令下载“latest”构建产物,但这也会从功能分支下载,无论是谁最后构建的。然而,我们只想要明确地使用来自主分支的最新构建产物。

有没有(正确的)方法来实现这个?

英文:

We would like to run scheduled builds on github using artifacts stored in Artifactory, from github.

I can download the "latest" artifacts using jf rt dl --build "Action Name" --flat but this will also download from feature branches, whoever build last. However, we want to specifically only use the latest artifacts from the main branch only.

Is there a (proper) way of doing this?

答案1

得分: 0

你似乎混淆了构建和分支。

  • "分支" 是 Git 中指代一个提交的词汇。
  • "构建" 是 CI(持续集成)中用来构建和发布代码到 Artifactory 的一系列指令的术语。

如果你的构建名称包含了分支名称,它将立即满足你的需求。例如,考虑以下上传命令:

jf rt upload a.txt generic-local/ --build-name="<build-name>-<branch>" --build-number="<build-number>"

据我所知,Artifactory 目前不支持使用版本控制系统信息来下载构建产物。

英文:

You appear to have mixed builds and branches.

  • A branch is a Git phrase that refers to a commit.
  • A build is a CI word for a sequence of instructions that builds and publishes code to Artifactory.

If the build name in your build contained the branch name, it would immediately meet your need. Take, for example, the following upload command:

jf rt upload a.txt generic-local/ --build-name="<build-name>-<branch>" --build-number="<build-number>"

Artifactory, as far as I know, does not now support downloading artifacts using VCS information.

huangapple
  • 本文由 发表于 2023年6月19日 21:57:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/76507345.html
匿名

发表评论

匿名网友

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

确定