2

I've read the answer from trigger jenkins build on tag creation with multibranch pipeline

The error is similar, only difference is that questions is for tag which seems due to not supported at the time of posting.

I encountered this error on branches, I have forked the repo, so I have an upstream and an origin, I pushed to both, and it shows the branch is there, but whenever I push any code, it just won't trigger.

Here is the settings: Type: Github Enterprise enter image description here

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
ForeverYang
  • 81
  • 1
  • 7

2 Answers2

9

This answer is for people with multibranch pipeline projects. You might need the Basic Branch Build Strategies plugin if you don't have it already, but it may already be part of your setup.

I added the Change Requests build strategy and it worked. Go to Branch Sources, under Build Strategies, click Add and add the Change requests configuration.

Reference: https://issues.jenkins.io/browse/JENKINS-54864

Kajal
  • 581
  • 11
  • 24
  • 1
    Does this still work in a current Jenkins? I am searching for this option but I am not able to find "Change requests" – Apollo Jan 30 '23 at 07:00
  • 1
    It does work for multibranch pipelines, maybe you are missing the Basic Branch Build Strategies plugin I mentioned? – Kajal Feb 28 '23 at 22:46
0

At the time of writing this, I changed "Trust" to everyone, and it seems to kick off the PR.

But leave the reference here in case it helps anyone.

Also, another reason might be: This is a new Jenkins pipeline, so the master still doesn't have any Jenkinsfile yet, that's also a reason why it's flaky, maybe a better way is to run with "trust everyone" first, merge to master, then change back the settings to "trust admin ... "

ForeverYang
  • 81
  • 1
  • 7