3

Gitea recommends a separate Gitea Plugin for Jenkins. I'm puzzled why two identical builds are triggered when a PR is created.

I'm trying to achieve the following:

  • Without a PR, a push to a branch should NOT trigger a build
  • Every time a PR is requested in Gitea, a build is triggered for the PR.
  • If a new revision pushed to the branch for which a PR is created, another check build should be triggered

It's kinda working... But for some reasons two builds are created. Could someone please explain, what are these pipeline/head and pipeline/pr-master builds, and why there are two of them?

enter image description here

Here is the relevant part of my Jenkins configuration. I understand that this selection is a "legacy" one, however it's the only one that allows me to build only on PR. If I select the "recommended" one, then every push triggers a build, which is not what I want. enter image description here

Thanks!

Mikha
  • 491
  • 2
  • 13

1 Answers1

3

Answering my own question. Awwww what a silly sausage I am. The only thing that needed to be done was removing the "Discover branches" behaviour. And, naturally, it stops discovering "just branches" :) For some reasons I did not realise I can remove the default behaviours.

enter image description here

Mikha
  • 491
  • 2
  • 13