Skip to content

The "Never" option for "Rebuild open Merge Requests" does not prevent a build #705

@tpbradt

Description

@tpbradt

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

  • Gitlab plugin version: 1.5.1
  • Gitlab version: 10.2.4-ee
  • Jenkins version: 2.59
  • Job type: Maven project

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...

  1. Push a change that intentionally breaks a build.
  2. Create a merge request and verify the build fails and merge request remains open.
  3. Revert the change and push (i.e. fix broken build).
  4. Expect it to never rebuild, but a new build is triggered immediately/automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugFor changelog: Minor bug. Will be listed after features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions