Drone

Mergine pull request in Gitea results on 2 builds

Hi,

There is something that I don’t understand with Drone 1.1.0.

I’m using Gitea and almost everything is OK for me. Pull requests are detected, build and deployments works.

Because Gitea doesn’t send good event when I create a release (the tag event is not sent), we decided to use the master branch and make a deployment when pull request is merged.

So, we added that:

kind: pipeline
name: build-staging

steps:
[... several steps here ...]

trigger:
  event:
    - push
  branch:
    - master

The problem is that 2 builds are launched as soon as we press “merge request”.

It’s like triggers are “OR” and not “AND” it seems.

If I’m using conditions (when) without trigger, there will be an empty build each time I accept PR. The build will clone, and nothing more.

Is this a Gitea problem (maybe it sends 2 events), or something to make in trigger ?

Thanks a lot !

the only way for the system to execute two builds is for Gitea to send two webhooks.

Ok, that’s weird but that seems to be the case… I will try to check gitea issues if someone reports the same. Thanks for your anwsers :slight_smile:

I checked and Gitea is now updated with a fix for that issue: https://github.com/go-gitea/gitea/issues/7702

I confirm that it works now. One more time, great job for Drone