Great minds think alike - Buildkite actually already has a /latest path that shows you the most recent build for a pipeline, available at buildkite.com/org-slug/pipeline-slug/builds/latest. However this just shows you the most recent build, not the most recent passing build.
It would be great to be able to filter /latest by state and branch as well - it currently support branch filtering but not state filtering. It’s a neat feature request though so I’ll see if we can get that done sometime soon!
I could have sworn that I tried just that. I must have misspelled it. :-/
However, I still do need to filter for a successful build—a failed build will not have the artifact in question. I suppose this is ok since our main build really shouldn’t be broken. But I think “shouldn’t” is the key word in that sentence, and reality is much messier than our intentions.
Probably the easiest thing to do is leave the slug alone and just add a build number (or range!) as a filter, and include “latest” as a special tag. Something like that.
Anyway, thanks for your consideration. Keep up the solid work.