可以使用以下URL访问Circle Ci 2.0工件https://{BUILD_NUMBER}-{UNKNOWN_NUMBER}-gh.circle-artifacts.com/0
CI内部编号之后的编号代表什么。
最佳答案
如果像我一样,您正在寻找一种以编程方式引用CircleCI(2.0)工件的方法,那么以下url结构对我有用:
https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/:build_num/artifacts/0/:path-to-artifact?circle-token=:token&branch=:branch
例如:
https://circleci.com/api/v1.1/project/github/circleci/circleci-docs/latest/artifacts/0/run-results/build-results.txt?branch=realitycheck&filter=successful
在circleci-docs项目的realismcheck分支的最新成功构建中,解析为
build-results.txt
工件。可以通过检查CircleCI构件目录结构来完成
:path-to-artifact
的构建:从上面看,
:path-to-artifact
是0/run-results/build-results.txt
。引用: