[JIRA] (JENKINS-53432) Unable to automatically discover and build git tags with Jenkins multibranch pipelines and the Git Plugin

15 views
Skip to first unread message

ryanewtaylor@gmail.com (JIRA)

unread,
Sep 5, 2018, 1:06:02 PM9/5/18
to jenkinsc...@googlegroups.com
Ryan Taylor created an issue
 
Jenkins / Bug JENKINS-53432
Unable to automatically discover and build git tags with Jenkins multibranch pipelines and the Git Plugin
Issue Type: Bug Bug
Assignee: Mark Waite
Attachments: image-2018-09-05-12-57-45-991.png, image-2018-09-05-13-03-24-545.png
Components: git-plugin
Created: 2018-09-05 17:05
Environment: * Jenkins v2.141
* Basic Branch Build Strategies Plugin v1.0.1
* Git plugin v3.9.1
* Bitbucket Server v5.13.1
* Webhook to Jenkins for Bitbucket Server v4.4.4
* Windows Server 2012 R2
Priority: Major Major
Reporter: Ryan Taylor

I configured a multibranch pipeline job to discover and build branches and tags for my git repository hosted in Bitbucket Server. New branches and commits are discovered and built correctly but new tags remain undiscovered. I can force tag discovery if I initiate a manual scan in Jenkins or I click "Trigger Jenkins" in the Webhook to Jenkins for Bitbucket Server UI for my repository.

 

My Jenkins Configuration

My Webhook to Jenkins for Bitbucket Server Configuration

 

Originally, I wanted to use the Bitbucket Branch Source Plugin rather than the Git Plugin but in that case JENKINS-51063 prevents tag discovery and build. Is there a similar issue with the Git Plugin?

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 12, 2018, 11:44:02 AM9/12/18
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 12, 2018, 11:48:02 AM9/12/18
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 12, 2018, 11:49:02 AM9/12/18
to jenkinsc...@googlegroups.com

ryanewtaylor@gmail.com (JIRA)

unread,
Sep 12, 2018, 12:01:02 PM9/12/18
to jenkinsc...@googlegroups.com

I have the Basic Branch Build Strategies Plugin installed, and set it to discover tags, but it tags remain undiscovered. The mentioned post is using the Git*hub* Plugin, not the Git plugin. I have a support request out to Mohami (creators of the Webhook to Jenkins for Bitbucket Server) and they indicated it is an issue in the Git Plugin.

I looked through git plugin source and unfortunately it has same issue [as JENKINS-51063]
https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/jenkins/plugins/git/GitSCMSource.java#L628
it incorrectly creates instance GitBranchSCMHead for tags when fires SCMHeadEvent (this is event is used by MultiBranch pipelines to trigger jobs - Freestyle jobs have another invocation procedure). So I don't think it's possible to trigger new tags this way

I'm not familiar enough with the plugin to make this assessment however.

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 12, 2018, 12:10:02 PM9/12/18
to jenkinsc...@googlegroups.com

John.Mellor@esentire.com (JIRA)

unread,
Nov 26, 2018, 9:13:02 AM11/26/18
to jenkinsc...@googlegroups.com

With the latest set of updates, multibranch is discovering all branches like it should, but skipping all builds not manually triggered.  Critical issue.

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 26, 2018, 10:57:02 AM11/26/18
to jenkinsc...@googlegroups.com

John Mellor you should probably open a separate bug report that describes how to duplicate the problem you mentioned as:

With the latest set of updates, multibranch is discovering all branches like it should, but skipping all builds not manually triggered. Critical issue.

If the only mention of a critical issue is in a comment on another bug report, it is much less likely to receive attention.

lars.niestrad@gmail.com (JIRA)

unread,
Sep 16, 2019, 2:03:02 AM9/16/19
to jenkinsc...@googlegroups.com

I got the same problem as Ryan Taylor we the exact same setup. Jenkins does not discover the tags automatically received by the Bitbucket hook. I always have to do a manual or scheduled rescan of the multibranch pipeline in order to discover them. I also have the Basic Branch Build Strategies Plugin installed and properly configured. As Ryan already stated it seems there is an issue in the git plugin regarding how it handles the information about a new tag sent by the hook.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

lars.niestrad@gmail.com (JIRA)

unread,
Sep 16, 2019, 2:04:02 AM9/16/19
to jenkinsc...@googlegroups.com
Lars Niestrad edited a comment on Bug JENKINS-53432
I got the same problem as [~iamrewt] we with the exact same setup. Jenkins does not discover the tags automatically received by the Bitbucket hook. I always have to do a manual or scheduled rescan of the whole multibranch pipeline in order to discover them. I also have the Basic Branch Build Strategies Plugin installed and properly configured. As Ryan already stated it seems there is an issue in the git plugin regarding how it handles the information about a new tag sent by the hook.
Reply all
Reply to author
Forward
0 new messages