-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "Never" option for "Rebuild open Merge Requests" does not prevent a build #705
Comments
@tpbradt I was about to write a different reply, but I realized I'm not positive I understand what config you have set up for the plugin. Can you please attach a screenshot of the Jenkins job config where the plugin is configured? |
Sure. The screenshot highlights the 3 configurations I mentioned.
![image](https://user-images.githubusercontent.com/3874799/35154321-d47158b0-fcf7-11e7-812c-cb15a901ed1a.png)
|
@tpbradt you will need to add the screenshot via the GitHub issue web page, not replying to the email. |
Done. Edited original comment above. |
@tpbradt and what URL are you using for the webhook on the GitLab side, to trigger this build? |
http://devbld:(key)@jenkins.ops.cld/project/fe/mr/app-pld ...with the key masked out. Just to make it clear, we have our own gitlab locally. |
@tpbradt if you're still having this issue, can you follow the instructions in the User Support part of the README and attach logs from the plugin when you see a rebuild that should not happen? |
Here is a log from me reproducing just now. We have done some updates recently to our tools: |
@tpbradt I can reproduce this. I'll see if I can figure out what the problem is. But I'm surprised no one else has seen it. |
@tpbradt what events have you set up in the webhook configuration in GitLab? Pushes and/or Merge Requests? |
Is there a workaround for this? Both "Never" and "Push to Source Branch" options for "Rebuild Open Merge Requests" do not work. |
@mmehra can you show me your webhook configuration from GitLab? Have you set up hooks for both pushes and MRs, or just MRs? Please follow the instructions in the User Support section of the README to increase debug logging for the plugin, and then attach those logs after you reproduce this issue. |
I realize this is somewhat of a thread hijack, but I am hitting the same issue as @mmehra: rebuilds are not happening at all: I have tried I have not tried pushing to the target branch to see if that triggers, but but pushes to the source branch do not trigger builds. This is version 1.5.9 of the gitlab plugin, and version 2.141 of Jenkins. |
@omehegan Just figured out the issue (in my case). These triggered builds:
I looked at my config again, and realized I had it set to ignore WIP merge requests (which I was using since it was a test MR). So, now the bug is: why is it triggering builds on create and note when "ignore" is checked. :) |
@jkugler how were you marking the MRs as being WIP? |
@omehegan The subject started with |
Hello, i read through this issue and issue #636. However I don't seem to find a solution for my problem. Versions:
Jenkins Trigger Config:
GitLab Webhooks
What I want to do: What happens:
Result: Question:
Thank you and please let me know, if Im missing Information, logs. |
Do we have any updates? I got the same problem and its very important for us because "when build job" configuration is the main idea of plugin. |
Look like I get this problem when json include "state" : "opened" and "action" : "update" with TriggerOpenMergeRequest.never |
I found the code which do this bug. On my jenkins I installed snapshot version and if you wanna, after some time, I can create Merge Request for project. |
I have built a snapshot with the change from #869 which should fix the issue of builds getting triggered even when "Rebuild open merge requests" is set to "Never." For those affected by that issue, please try this and let us know if it fixes the problem. http://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/gitlab-plugin/1.5.12-SNAPSHOT/gitlab-plugin-1.5.12-20181217.052605-2.hpi |
@GoWithTheFlo95 it sounds like your issue would be resolved if we fix #636. Do you agree? |
@omehegan Just tried the build you provided 2 days ago and I can confirm it fixes the issue for me |
@omehegan sorry for the late Reply, but yes this would fix my problem. |
@omehegan Any update on when the fix will be merged ? |
I'm experience the same issue when Accept the merge on GitLab, it is not trigger a new job on jenkins I'm using gitlab 12.5.8 jenkins 2.229 git plugin 4.2.2 gitlab_plugin 1.5.13 Do you have any idea about when it will be solved ? |
Hi |
Issue
When setting up the Build Triggers for our Jenkins jobs, we use:
Build when a change is pushed to GitLab = checked
Opened Merge Request Events = checked
Rebuild open Merge Requests = Never
The behavior with gitlab-plugin v1.1.32 was that when an open and previously failed merge request had a subsequent push, the build did NOT get triggered. When we upgraded to 1.4.5 this was no longer the case. A rebuild occurred even with the option set to Never. We recently upgraded to v1.5.1 and it is still triggering the rebuild. The documentation on the home page does not describe expected behavior for this configuration, but intuitively this seems broken to me.
Context
Logs & Traces
Following is the Discussion in Gitlab:
Dev Builder @devbld commented 24 minutes ago
Developer
❎ Jenkins Build FAILURE
Results available at: Jenkins [diqfe-parent #77]
Dev Builder @devbld commented 24 minutes ago
Developer
👎
Bradt Timothy P @bradttp added 1 commit 22 minutes ago
1b79cca6 - DOS-1016: Test if the new gitlab-plugin fixes the problem with "Never" rebuild…
Compare with previous version
Dev Builder @devbld commented 21 minutes ago
Developer
✅ Jenkins Build SUCCESS
Results available at: Jenkins [diqfe-parent #78]
Dev Builder @devbld commented 21 minutes ago
Developer
👍
Dev Builder @devbld merged 21 minutes ago
These are the 2 Jenkins log entries showing the merge request triggered both builds:
14:52:37 Triggered by GitLab Merge Request #44: fe/dev_test_gitlab_plugin => master
14:54:52 Triggered by GitLab Merge Request #44: fe/dev_test_gitlab_plugin => master
Problem description
With the above configuration...
The text was updated successfully, but these errors were encountered: