Gitlab-plugin: Multibranch Pipeline not triggered

Created on 3 Mar 2021  路  18Comments  路  Source: jenkinsci/gitlab-plugin

Issue

Hi, After updating gitlab plugin to 1.5.19, gitlab plugin doesn't trigger multibranch pipeline scans.
In version 1.5.13 it works perfectly.

Context

  • Gitlab plugin version: 1.5.19
  • Gitlab version: gitlab.com
  • Jenkins version: 2.263.4
  • Job type: Multibranch Pipeline

Most helpful comment

When will this version will be available for update in Jenkins plugin manager?

All 18 comments

+1

Everything is reporting as successful (Gitlab & Jenkins Logs) but the build just won't trigger.

  • Gitlab plugin version: 1.5.19
  • Gitlab version: gitlab.com
  • Jenkins version: 2.263.4
  • Job type: Multibranch Pipeline

Manually falling back to version 1.5.13 works perfectly.

1.5.17.1 (previously published version) works fine

The same problem upgraded Jenkins to 2.263.4 and GitLab plugin from 1.5.13 to 1.5.19
Here is what I'm getting when kicking off push event in Settings -> Integrations -> Test -> Send Push:
GitLab:
Hook executed successfully: HTTP 200
Jenkins Logs:

WebHook called with url: /project/services/docker-build-expo
Mar 08, 2021 3:06:02 PM INFO jenkins.branch.MultiBranchProject$BranchIndexing run

But build isn't starting

We just downgraded back to 1.5.13 and restarted, but it didn't help, no more push triggers going trough.

Just noticed this problem.
I'm not familiar with the Jenkins source code, but I believe this bug was introduced in version 1.5.18 of the GitLab plugin via commit 4eb27b477fd0c5fa7c809b268e1d2d0b635c0f35.
Seems like the modified if condition contains a logic error, it should read == null instead of != null:
https://github.com/jenkinsci/gitlab-plugin/blob/4eb27b477fd0c5fa7c809b268e1d2d0b635c0f35/src/main/java/com/dabsquared/gitlabjenkins/webhook/build/PushBuildAction.java#L107-L114

I'm also encountering this problem, here is some additional logging:

09-Mar-2021 14:24:25.683 FINE [Handling POST /jenkins/project/folder/my-project from 149.210.189.247 : ajp-nio-9009-exec-3] com.dabsquared.gitlabjenkins.webhook.build.PushBuildAction$SCMSourceOwnerNotifier.run Ignore on push notification for scmSourceOwner my-project about changes for git@server:folder/my-project.git

I've also traced this to the if mentioned by @jre-lsft

I just updated Jenkins LTS from version 2.263.4 to version 2.277.1 and a bunch of plugins. I'm pretty sure I had a very recent plugin version installed, if not the most recent. (Assuming the tagged releases were deployed for plugin installation in the Update Center.) Now the hook triggers no longer work; they do not trigger a Multibranch Pipeline Scan.

The GitLab hook works fine, returning HTTP Status 200. Triggering the Multibranch Pipeline Scan manually works fine too.

Plugin manager offered to downgrade the GitLab plugin to 1.5.13, which I did, and it works again.

I am encountering this issue as well. GitLab receives HTTP code 200 as a response to a Push Hook. In the Jenkins-Console, I only see this:

2021-03-11 17:41:35.984+0000 [id=105]   INFO    c.d.g.webhook.GitLabWebHook#getDynamic: WebHook called with url: /project/experimental/multibranch-pipeline-test

I also confirm that reverting this plugin to 1.5.13 fixes that issue.

Heh, this code mentioned by @jre-lsft looked so familiar to me... no wonder! I've already given it a shot to fix the dependencies https://github.com/jenkinsci/gitlab-plugin/pull/965 but @bulanovk did a better job apart from that
https://github.com/jenkinsci/gitlab-plugin/blob/4eb27b477fd0c5fa7c809b268e1d2d0b635c0f35/src/main/java/com/dabsquared/gitlabjenkins/webhook/build/PushBuildAction.java#L107

+1,how can have a new version fix this bug , I find the why all day until find this issue...

@Smasherr thank you for highlighting my mistake, to avoid such error in future, i suggest to extend MR provided
by @jre-lsft with unit test to check if multibranch build was called.

@omehegan @MaximeMazet Could you please help release a plugin with MR #1118

When will this version will be available for update in Jenkins plugin manager?

Any update on this?

I make an update this week-end ;)

@MaximeMazet pardon me, which exactly weekend? 馃榿

Mmmmmmh oupsy ^^
I make the update this week I hope today 11PM (French hours) ;)

@Smasherr It's good ;)

Thanks, got it :-) Happy easter! 馃惏

Was this page helpful?
0 / 5 - 0 ratings