Bitbucket branch source - WARN: Could not find ref: XXX in refs/heads or refs/remotes/origin

已查看 8 次
跳至第一个未读帖子

Dan Tran

未读,
2019年9月2日 17:45:302019/9/2
收件人 Jenkins Users
Hi 

I am looking for suggestion on how to configure BB branch source plugin to fix the sonar/git issue discussed at  https://community.sonarsource.com/t/error-warn-could-not-find-ref-develop-in-refs-heads-or-refs-remotes-origin-after-updating-to-7-6/6420


Very much appreciated

-D

Mark Waite

未读,
2019年9月2日 18:39:532019/9/2
收件人 Jenkins Users
The branch sources (GitHub, Bitbucket, Gitea, and Gitlab) may configure the checkout of a specific workspace to include only the changes for the branch which that workspace is using.  That is a very good default choice because it can reduce the data transfer from the git server to the workspace and can reduce the disc use and clone time for the job.  It appears that your use case may need to use changes from another branch which is related to the branch the workspace is using.

If the build process (Sonar diff computation, etc.) needs more than the changes for the specific branch that you're using, you may need to extend the Jenkins Pipeline definition for that job to use a custom refspec to include additional branches in the workspace.  The pipeline command 'checkout' allows custom refspecs to be defined and used.  You will likely also need to use the clone option "Honor refspec on initial checkout" in order to assure that the initial clone also uses the custom refspec definition.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/50e75680-a968-41b7-b483-a71e01848ca2%40googlegroups.com.


--
Thanks!
Mark Waite
回复全部
回复作者
转发
0 个新帖子