Support for job trigger for based on a github PR labels?

Have you considered to trigger jobs based on a label.

I am working on e2e, benchmarking tests for the official Prometheus project which would take at least 24h so we don’t want to run these for all PRs

The idea is that when the PR might affect the performance or the PR is for a new release, one of the maintainers will simply add a label that will trigger a specific job.
The git tags can be used as a workaround, but that would mean asking the PR author to add a tag.
Using labels will skip this step so when a maintainers considers a PR for performance testing can just add the label and start the tests.

for example
label benchmark - run Benchmark test to compare with previous commit
label benchmark release - run Benchmark test and compare with previous release

1 Like

I had not previously considered it, but I certainly love the idea.

We had a similar request to trigger builds based on comments, as well as limit which steps are executed based on comments: https://github.com/drone/drone/issues/2056

While the interaction is slightly different, I think they probably end up working in very similar ways under the hood. I would recommend (if you don’t mind) creating a github issue that proposes how this would work in greater detail. For example would adding or removing labels trigger a new build? Or would we only take labels into account when on subsequent pushes?

yep comments would work as well, in this case the PR author can also trigger tests which might be useful in some cases.

Once I get to a bit further with the tests will create a more detailed proposal.

Did you ever end up creating an issue for this? This is something we are interested in as well.

No, we went into a different direction.

As you say, when I add or remove a label, drone always triggers a new build. How can I skip this type of event?

trigger:
  branch:
    - master
  event:
    - pull_request

aayi yayi yayi … pity I just bumped into this requirement … pff