Circle Ci 2.0 artifacts can be accessed with the following url
https://{BUILD_NUMBER}-{UNKNOWN_NUMBER}-gh.circle-artifacts.com/0
What does the number after CI build number represent.
Navigate to a pipeline's Job page on the CircleCI web app to find the Artifacts tab. Artifacts are stored on Amazon S3 and are protected with your CircleCI account for private projects.
The artifacts are stored on the server "as is" without additional compression. By default, the artifacts are stored under the <TeamCity Data Directory\>/system/artifacts directory which can be changed. You can configure an external artifacts storage to replace the built-in one.
If, like me, you were looking for a way to programmatically reference CircleCI (2.0) artifacts, the following url structure works for me:
https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/:build_num/artifacts/0/:path-to-artifact?circle-token=:token&branch=:branch
For example:
https://circleci.com/api/v1.1/project/github/circleci/circleci-docs/latest/artifacts/0/run-results/build-results.txt?branch=realitycheck&filter=successful
resolves to the build-results.txt
artifact on the latest, successful build of the circleci-docs project's realitycheck branch.
Constructing the :path-to-artifact
can be done by inspecting your CircleCI artifacts directory structure:
From the above, the :path-to-artifact
is 0/run-results/build-results.txt
.
Reference:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With