jenkinsci / jenkinsci/gitlab-plugin

Option to prevent push trigger when merge request is updated

Open
#1,011 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.4k
Forks
615
Avg merge
4h 32m
Merged PRs (30d)
10

Description

### Before submitting an issue I have first:

## Issue

My Jenkins job is triggered for push and merge requests events in GitLab. The push hook executes just the project unit tests. The MR hook executes the slow integration tests.

When in a MR a reviewer asks for modifications, the developer makes a new push to the branch with an already open merge request. Then:

1. The push event is triggered
2. The MR event is also triggered

Since the MR request will reexecute everything that is done in the push event, this build is unnecessary. I'd like to prevent to execute it.

### Context
- **Gitlab plugin version**: 1.5.2
- **Gitlab version**: 11.11.3
- **Jenkins version**: 2.164.2
- **Job type**: Pipeline

### Problem description

_Describe your problem in a meaningful way_:
- what were you doing (simple push, merge request, MR with fork, ...)

Push to a branch with already open MR. Pipeline is triggered from MR and push events with different behavior in each.

- what was expected

Be able to just execute the merge request build, preventing the execution of the push event.

- what occurred finally

The push build is executed unnecessarily and then the MR build is executed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.