可以使用以下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的构建:

circleci - Circle Ci 2.0工件URL-LMLPHP

从上面看,:path-to-artifact0/run-results/build-results.txt

引用:
  • https://circleci.com/docs/api/v1-reference/#build-artifacts
  • 10-06 08:57
    查看更多