您如何将多个 TFS 存储库拉入单个 Jenkins 作业中? [英] How do you pull multiple TFS repos into a single Jenkins job?

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

问题描述

我有一个包含 2 个子文件夹 $/Repo/project 和 $/Repo/thirdparty 的存储库.我需要将这两个都拉到 Jenkins 中进行一次构建.自然地,我尝试只拉 $/Repo,但这给了我一堆其他项目以及错误的民意调查(每次检查 $/Repo 时都会构建).我曾尝试使用可以工作的 multi-scm 插件,但不保存配置(烦人,但并非无法使用).我尝试使用常规的 tfs 插件并手动将其他 repo 的调用放入 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 命令或触发器来拉一个不同的 repo?

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 中将为您带来许多可能性,包括为每个文件夹使用单独的 repos、使用 git 模块、git externals ……等等.所以,至少对我来说,这是一个有效的选择,尽管乍一看似乎是一个丑陋的解决方法......
  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天全站免登陆