I have a pipeline which should trigger only when a pull_request are opened or pull_request are updated.
Every time I push some change on this PR, drone triggers 2 builds: one which just clone and another one for the configured pull request.
Is there a way to tell drone to only build on the PR?
@bradrydzewski That triggers on either pull request OR push. We would like to build only when pushing on branches that have a pull request. Background is that the drone pipeline is expensive (resource wise) and time consuming so it should not happen on every push.
when you push to a branch with an open pull request, it triggers a pull_request synchronization event. Therefore you can instruct Drone to only trigger pipelines for pull requests.
@bradrydzewski Thanks for your quick response! I tried that today with BitBucket, push on open pull request does NOT trigger another build with Drone 1.7.0! It just revokes the “successful build” tag from the pull request…
Ideas are very welcome
are you running bitbucket server (self-hosted)? If yes, this is an issue with bitbucket server which, until recently, did not send synchronization events. Bitbucket server recently added support for this capability, but now we need to update code in Drone to support it, which has not happened yet.