Pipeline "latest" link?

By chance is there a way to link to the latest successful build on a specific branch in a pipeline?

As a Buildkite user, I want to easily locate some artifact from the latest successful build off main to check the state of it.

For example, we generate a report during our main CI build, and I’d like to have a URL shortcut directly to this report for easy consumption.

Perhaps just a /latest slug off the pipeline URL would be easy to implement?

Hey @clambertops!

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.

The pipeline builds page can be filtered by branch and state though, so one way to find the most recent passing build is to go to buildkite.com/org-slug/pipeline-slug/builds?state=passed&branch=main

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.

Hey @clambertops!

If you go to buildkite.com/org-slug/pipeline-slug/builds/latest?state=passed&branch=your-branch-name it should now take you to the latest successful build for the given branch!

Hope that helps with your artifact searching!

1 Like