Drone

Which runner processed my pipeline?

This question seems to come up on the official gitter quite frequently.

Day to day, you don’t need to know which machine ran a particular pipeline, but it’s useful from time to time. I tend to use it when one of the machines running my drone array seems to be inordinately slow, and I want to know which one :slight_smile:

At time of writing the web console does not show which machine / runner processed a particular pipeline. This information is only available via the API.

You need to look at:

https://{your-drone-server}/api/repos/{username}/{reponame}/builds/{buildnumber}

You’ll see some JSON.

In that JSON there is a key called “stages”. That key contains an array of “stages”, each of which broadly corresponds to a “pipeline” in your drone.yml file.

Each stage is itself an array… so useful items in that array, with some sample values, are:

  • kind: “pipeline” // I’m not sure whether there are other possible values?
  • machine: “ip-xxx-xxx-xxx-xxx.eu-west-2.compute.internal” // where the xxxs are numbers in an IP address that I’ve obfuscated for this forum post
  • os: “linux”
  • status: “success” // other values include things like “killed” etc.
1 Like

Is there any kind of priority scheme or other way to influence which runners are used? I would like to prefer more powerful runners when they’re available (not because they get different answers, just because they get them faster) but I don’t want to outright disable slower, backup runners.

You can designate specific runners to handle specific pipelines [1][2], however, this is all or nothing meaning the runners would process matching pipelines and nothing else. Unfortunately we do not have any sort of advanced matching logic that would meet your requirements.

[1] https://docs.drone.io/pipeline/docker/syntax/routing/
[2] https://docs.drone.io/runner/docker/configuration/reference/drone-runner-labels/