[JIRA] (JENKINS-61008) Branch API 2.5.4 does not recognize manually triggered build commit and kicks off build after scan

89 views
Skip to first unread message

cnserd@gmail.com (JIRA)

unread,
Feb 6, 2020, 7:48:02 PM2/6/20
to jenkinsc...@googlegroups.com
Cansu Erdogan created an issue
 
Jenkins / Bug JENKINS-61008
Branch API 2.5.4 does not recognize manually triggered build commit and kicks off build after scan
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: bitbucketprojectdsl.groovy
Components: branch-api-plugin
Created: 2020-02-07 00:47
Environment: Jenkins version 2.190.3, Branch API version 2.5.4, Bitbucket Branch Source version 2.4.6
Priority: Minor Minor
Reporter: Cansu Erdogan

We are seeding Bitbucket repositories in Jenkins using Bitbucket Team/Project type of jobs and you can find our job DSL file attached.

We ran into an issue where user triggered builds on master branches get rebuilt upon branch indexing (e.g. when someone triggers the multibranch pipeline scan). Note that in this scenario the Jenkins hook in Bitbucket repo was not configured correctly so the new commit did not automatically trigger a build when, for example, a pull request was merged to the master branch.

 

Steps to reproduce (this is without having a Jenkins hook properly configured in Bitbucket so we can mimic users triggering jobs):

  • Kick off a master branch build so it's up-to-date and successful (building latest commit in master: f264be47)
  • Create a pull request from testbranch to master with new changes
  • Scan multibranch pipeline -> Jenkins detects the pull request and kicks off a build
  • Merge pull request -> nothing happens due to no hook
  • Manually kick off a master branch build (building pull request merge commit in master: 835d8b37)
  • Scan multibranch pipeline

Expected result:

No changes detected: master (still at 835d8b37)

Actual result:

Changes detected: master (f264be47 → 835d8b37)

Scheduled build for branch: master

 

The same steps produced the following result when testbranch-1 was merged into testbranch-2 (essentially between two non-named branches):

Changes detected: testbranch-2 (null → 39fb6587)

No automatic build triggered for testbranch-2

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages