gitlab-plugin icon indicating copy to clipboard operation
gitlab-plugin copied to clipboard

MR Jenkins Build Status after re-triggering the same build

Open praveen-mummasani opened this issue 6 years ago • 2 comments

Issue

When we create a MR,we are able to see build status as running in the GitLab.Due to any issue the build fails and we just re-trigger the build again from Jenkins,gitlab is not showing latest build status and just showing build status as failed from the previous build.

Context

  • Gitlab plugin version: 1.5.12-SNAPSHOT (private-90d6c97c-owen)
  • Gitlab version: 11.9.4-ee
  • Jenkins version: 2.152
  • Job type: Pipeline

Logs & Traces

No Logs in the GitLab

Problem description

Describe your problem in a meaningful way:

  • what were you doing (simple push, merge request, MR with fork, ...) Create MR request and observe the Build status as Running. Fail the Build and build status will be displayed as Failed in the Gitlab Trigger the Build again for the MR
  • what was expected You should see the Build status for the latest Build running but it will be pointed to old build of jenkins
  • what occurred finally As we can not get latest build status,we can not merge the MR and need to push dummy commit again to get the latest status as green

praveen-mummasani avatar Sep 26 '19 11:09 praveen-mummasani

we just re-trigger the build again from Jenkins

That is why MR is not updated in GitLab. Because Jenkins does not have MR context when manually triggered. So it can not wire up pipeline run with GitLab MR.

and need to push dummy commit again to get the latest status as green

Instead you can use "Comment (regex) for triggering a build" GitLab plugin property to specify MR discussion message that will re-trigger build in Jenkins.

antonovicha avatar Oct 10 '19 09:10 antonovicha

Hello @antonovicha,

I'm facing a similar issue. I tried the fix you proposed (re-triggering via Gitlab comment). Unfortunately, this does not resolve the issue. The second pipeline is successful, but the Gitlab pipeline status is still "failed". Is this a bug in the plugin or in Gitlab itself? image

  • Ben

BenPortner avatar Sep 13 '23 12:09 BenPortner