英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论