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

New Build based on tags trigger two pipeline events and update only one of them

Open theCrius opened this issue 5 years ago • 0 comments

Issue

Two pipeline are triggered every time a new tag is pushed to the remote repository.

Context

  • Gitlab plugin version: 1.5.3
  • Gitlab version: Cloud Version
  • Jenkins version: 2.204.5
  • Job type: Pipeline

Problem description

This Jenkins installation is made to deploy on a simple VM that act as a staging environment for internal applications. Every job trigger a new build on the release of a new tag that follows a specific pattern. Every time a new tag following the pattern beta/vX.Y.Z is pushed in the remote repository, a new build should be triggered.

Webhooks are configured properly and everything works as expected. The problem is related to the GitLab Pipelines section.

Every time a new build is triggered, two events are created. It seems like the first one is triggered as soon as the build is triggered and the job is in the queue. The second one when the actual job start, which update when it finishes.

The first event is never updated and remain in "pending" status forever unless a gitlab user goes and cancel it. image

These are the relevant configurations for the job: Refspec: +refs/tags/*:refs/remotes/origin/tags/* Branch Specifier: /tags/beta/** Build trigger: Build when a change is pushed to GitLab Enabled GitLab Triggers: Push Events As last action of the pipeline I've used Publish Build Status to Gitlab

I understand that this could be a jenkins config issue more than a jenkins-gitlab plugin issue but I don't really know where to start asking for help about this.

theCrius avatar Dec 08 '20 14:12 theCrius