简体   繁体   English

如何使用带有git的Jenkins多scm插件获取所有git提交

[英]How do I get all git commits using Jenkins multiple scm plugin with git

Has anyone successfully setup jenkins multiple scm plugin with git where commits from all configured git repos display in both the git build data and jenkins build job build page? 有没有人使用git成功设置jenkins多scm插件,在git构建数据和jenkins构建作业构建页面中,所有已配置的git repos的提交都会显示? I've configured all of the git repos with their own name and custom scm name which displays correctly in the middle of the build page but not in the left nav git build data links. 我已经使用自己的名称和自定义scm名称配置了所有git repos,这些名称在构建页面的中间正确显示,但在左侧nav git构建数据链接中没有。 Nor do all of the changes from all configured git repos display, only the first one in the list. 所有配置的git repos的所有更改也不会显示,只显示列表中的第一个。 Although, all of this information seems to be stored correctly in the build projects build.xml. 虽然,所有这些信息似乎都正确地存储在构建项目build.xml中。

Suggestions on a workaround? 有关解决方法的建议?

In short, I have 5 git repos for one 1 jenkins build project. 简而言之,我有一个1 jenkins构建项目的5 git repos。 I would like the commit history for all 5 git repos (not just the top repo) to display or at least be in the git build data link. 我想要显示所有5 git repos(不仅仅是顶级repo)的提交历史记录,或者至少在git构建数据链接中。 This also impacts updating Atlassian's STASH commit's with the jenkins build inforamtion, as well as, JIRA's CI build tab with the Jenkins build information. 这也会影响使用jenkins构建信息更新Atlassian的STASH提交,以及JIRA的CI构建选项卡和Jenkins构建信息。

Install plug-in 'Multiple SCMs plugin' and setup your repositories: 安装插件“Multiple SCMs plugin”并设置您的存储库:

  • Repository URL 存储库URL
  • Credentials Click on 'Advance' button 凭据单击“高级”按钮
  • Name: provide name as 1st repository origin, 2nd origin1 and so on. 名称:提供名称作为第一个存储库源,第二个原始库1,依此类推。 You can provide any unique name 您可以提供任何唯一名称
  • Check out to a sub-directory ie local subdirectory for repo (directory on your system in which you want your repo to be checked out) 检查一个子目录,即repo的本地子目录(系统中要在其中检出repo的目录)
  • Custom SCM name 自定义SCM名称

Set up all your repos similar to above steps. 设置与上述步骤类似的所有回购。 Attaching screen shot of my jenkins configuration. 附上我的jenkins配置的屏幕截图。

Jenkins配置2个回购

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM