-
Bug
-
Resolution: Unresolved
-
Minor
-
None
When sending build status to GitLab, the GitLab Plugin does not send the branch name ref attribute with the revision hash.
The problem with not sending ref happens when there are two branches that contains the same commit hash. The second branch to build will never get a GitLab pipeline.
If you create a subset of an existing branch that previously built. When building the new branch in Jenkins, GitLab will attach the build status on the existing pipeline for the old branch.
This is a problem when we have a Merge Request on the new branch. Since GitLab will never get a build status for this branch, we cannot merge (since we require a pipeline success to merge).
If the plugin had sent the ref also, GitLab would create a new pipeline for that branch.
I was able to do this manually to get GitLab create a new pipeline by calling the following REST URL.
https://gitlab.company.com/api/v4/projects/123/statuses/REVISION_HASH?state=success&ref=REVISION_REF