Expose build artifacts for "latest build of the master branch", instead of for a specific build number
D
David
Build artifacts can produce useful information, such as documentation and performance graphs. However, there are typically two different scenarios where someone wants to look at a build artifact:
I want to see how this change will modify the existing documentation/performance
I want to see the documentation/performance for the latest commit on the master branch
For either scenario, seeing the build artifacts for the latest commit on the master branch is important. However, there doesn't currently seem to be a way to expose that concept. Build artifacts are only exposed via URLs that contain the CircleCI build number.
I would like CircleCI to expose URLs that contain a branch name, instead of a CircleCI build number. This URL could be used to refer to build artifacts in an arbitrary build. When a client resolves this URL, CircleCI should issue an HTTP redirect to the most recent CircleCI build for the latest commit of that branch.
Here's a specific use case:
My project builds HTML documentation. I would like to include a link in the README to point the reader to the latest version of this HTML documentation. I would like CircleCI to build and host this documentation for me via the build artifacts feature. I need a stable URL to put in the README file, that will reliably result in the latest version of this HTML documentation.
CCI-I-228
N
Nicolas Tresegnie
+1
This would be super useful to link to test reports, coverage reports, or code analysis reports.
@CircleCI: Currently, URLs are in the following format: https://app.circleci.com/pipelines/github/<org>/<repo>/<build id>/workflows/<workflow id>/jobs/<job id>
To address the latest artifacts, we would use the following parameters:
<build id>: we would use "latest". It would mean "the latest pipeline on the default branch" (or a branch passed as query parameter if you think it's ambiguous)
<workflow id>: we would use the workflow name. It would mean "the latest run of the workflow with that name on the latest pipeline". So, it would work even after retries.
<job id>: we would use the job name.
We would also need to add the artifact path. Merging the current url pattern (https://output.circle-artifacts.com/output/job/<job id>/artifacts/0/<artifact path>) with the above, we would have:
https://app.circleci.com/pipelines/github/<org>/<repo>/latest/workflows/<workflow name>/jobs/<job name>/artifacts/0/<artifact path>
What do you think?
Avner
This project seems to be in the right direction - https://github.com/jokester/cart
It would be really nice to have an alias link that is static and points to "latest", this is very important when wanting to incorporate handy circleCI links into developer portals or readme files.
Linards L
Sounds great! Please implement this.