This would be really nice
Hehe, I was about to post the same feature request but then found this post luckily
I was also looking at the API and playing around with it, but in the end it didn’t help as it requires a programmatic approach to get that info, not just a link.
So +1 for:
- ability to reference the :latest build on a specific branch via URL
- ability to have predictable artifact URLs (i.e. without the random string inbetween)
I put this up as a “redirector service” to serve stable URLs for latest build and artifacts:
GET /api/v1/* will be redirected as-is, i.e. you can use it as a drop-in replacement (unless you are using POST or DELETE)
Sure you can also host it yourself, source code is here:
+1 It seem to me completely obvious that this would be a nice feature to have (without having to use the API). Use case: Badge in a README file that links to an html coverage report that is an artifact of the latest build.
Be sure to click on the heart on the main feature request to show your “official support” for this feature.
We are excited to announce that we have shipped support to retrieve your latest build artifacts. You can read more about it in our docs.
Maybe I am missing something, but I still don’t see a way to link directly to the latest version of a build artifact. What I see in the docs is a way to list the artifacts of the latest build, which would then require grabbing the URL of the particular artifact I’m looking for from the url attribute of the json response. But those artifact URLs still have a build identifier in them, so e.g. there’s still not a stable link to the latest coverage report’s index.html file.
I don’t see it either. The feature request as described in the OP is still not present.
Because this is so clunky I have to re-educate my test people all the time.
- Click http://blah/tree/master
- Click on the topmost very tiny build #
- Click on the tiny “Artifacts” tab swimming around in the middle of the page somewhere
- Finally go find the actual thing you wanted at the beginning over on the left somewhere
Far cry from a “download” link which is really all they should need.
It’s certainly not convenient, and should probably be treated as a private implementation detail, but looking at the links in that post you can construct a link that will 302 redirect you to the actual artifact location as follows:
File.join(*[ ENV["CIRCLE_BUILD_URL"], ENV['CIRCLE_NODE_INDEX'], "artifacts", ENV["CIRCLE_ARTIFACTS"], "path/to/artifact.html", ])
I found this project. Thought it is useful for this dicussion thread.
Get an artifact from the latest green build of your current project’s master
$ cart path/to/artifact
I am also very interested in this feature.
It would be great if this post could be marked unsolved so as to not cause confusion.
Yeah this is not fixed. I build docs artifacts and would like to point to the latest docs in my README but this is not currently possible. The solution posted is only for API clients, whereas the OP (and I) would like a public URL that redirects/masks to the latest build.
Same here, it’d be really nice to be able to link to latest docs and such generated during a build.
Right, what’s wonderful about this idea is that it potentially allows us to not have to add a dependency to the API client in order to fetch the latest package. This is similar to a convention that many open source packages use, which is creating a latest.tar.gz along with a version_number.tar.gz, so you can auto-fetch that one.
The reluctance to implement this is really baffling. It seems like it would be simple to implement, virtually no maintenance, and really useful for many people.
Bump. I really want to link to latest nightly run artifacts from the projects readme.
+1. I would also like to see this feature for my projects. I generate badges and test coverage reports as artifacts. It would be great if I could have links that always pointed to the latest ones.
I did find a url like this:
But it gives me 500 every time. And has for the past ~6 months.
Using the following URL from the documentation works, but I also get 500 errors when I try this on my own repositories.
It would be great if we could get some input from a CircleCI employee here.
This should be working. I wrote a wrapper around the API and this particular method worked for me on the first try.
Can you share the specific URL that you are using that is causing a 500 error?