您如何将多个TFS仓库放入一个Jenkins作业中? [英] How do you pull multiple TFS repos into a single Jenkins job?

查看:129
本文介绍了您如何将多个TFS仓库放入一个Jenkins作业中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个回购协议,其中有2个子文件夹$/Repo/project和$/Repo/thirdparty.我需要将这两个都放入Jenkins中以进行单个构建.自然地,我尝试仅拉$/Repo,但这给了我许多其他项目以及错误的民意测验(每次将任何内容检入$/Repo时,它都会构建).我试过使用可以工作的multi-scm插件,但是不保存配置(烦人,但不可用).我尝试使用常规的tfs插件,并将其他仓库的调用手动放入Windows命令中(即使通过将它们绑定到其他文件夹也无法使用).

I have a repo that has 2 subfolders $/Repo/project and $/Repo/thirdparty. I need to pull both of those into Jenkins for a single build. Naturally I tried just pulling $/Repo, but this gives me a bunch of other projects along with false polls (it will build every time ANYTHING is checked into $/Repo). I have tried using the multi-scm plugin which works, but does not save the configuration (annoying, but not unusable). I tried using the regular tfs plugin and manually putting the calls for the other repo into a windows command (this did not work even through i bound them them to different folders).

解决此问题的最佳方法是什么?某种拉第三者的子工作?修复多个scm插件?拉项目时是否有一些tfs命令或触发器来拉不同的仓库?

What is the best way to approach this? Some sort of subjob that pulls third party? Fix the multiple scm plugin? Is there some tfs command or trigger to pull a different repo when you pull a project?

推荐答案

Jenkins的TFS插件当前不支持从多个位置检出源. Multiple-scm-plugin可能是答案,但是正如您在问题中指出的那样,这实际上不是一个选择.就我所知,确实只有可能的解决方案供您测试:

The TFS pluging for Jenkins currently does not support checking out the sources from multiple locations. multiple-scm-plugin might be the answer, but as You pointed out in the question - it's really not an option at this point. There are really, as far I can see it, only to possible solutions for you to test out:

  1. 在TFS中创建一个包含所有必要导入的工作空间.我在与TFS的日常接触中都使用了此功能,尽管我从来没有机会将其与Jenkins插件一起使用.它可能有效,但可能无效.
  2. 您可以使用,请-这是一个非常严肃的选择,至少对我来说-git.有一个 git-tfs 并将所有必需的项目导入git存储库.将它们放入git将为您打开一堆可能性,包括为每个文件夹使用单独的存储库,使用git模块,git外部组件...等等.因此,至少对我来说,这是一个有效的选择,尽管乍看之下这似乎是一个丑陋的解决方法...
  1. Create a workspace within TFS that will include all the neccesary imports. I use this functionality in my every-day encounters with TFS, although I have never a chance to use that with Jenkins plugin. It might work, it might not.
  2. You can use, and please - this is a quite serious option, at least for me - git. There is a git-tfs and import all of the required projects into git repository. And having them in git will open a bunch of possibilities for you, including using separate repos for every folder, using git modules, git externals... and so on. So, at least for me, it is a valid option, although it seems like an ugly workaround at the first look...

这篇关于您如何将多个TFS仓库放入一个Jenkins作业中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆