jenkinsci / jenkinsci/gitlab-plugin

GitLab trigger will not allow the same commit to be built twice.

Open
#958 4 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

## Issue

### Context
- **Gitlab plugin version**: 1.5.12
- **Gitlab version**: 11.10.4
- **Jenkins version**: 2.176.1
- **Job type**: Pipeline

### Logs & Traces

None available (job does not trigger)

### Problem description

I have a job set up to build merge requests. It should build under the following circumstances:
- When a merge request is opened
- When either the source or target branch of a merge request changes
- When a merge request is merged

The primary issue is that merged MRs are not causing a build to trigger, unless a secondary job is created purely for that purpose. The GitLab hook is fired and Jenkins responds with a 200 response, but no build occurs.

Further digging and googling suggests that this is due to the GitLab trigger not allowing a job to be triggered twice for the same commit (which is effectively the case when an opened MR is built and then the MR is merged). This is supported by the fact that re-sending the webhook for either the opening of the merge request or the merging of it gives similar results - a 200 response from Jenkins, but no job triggered.

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.