Jenkins可以拉出TFS门控的签入代码进行构建吗? [英] Can Jenkins pull TFS gated checkin code for build?

查看:201
本文介绍了Jenkins可以拉出TFS门控的签入代码进行构建吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让Jenkins提取TFS门控的签入代码,但没有这样做.

我设法在TFS中添加了Jenkins构建步骤,此构建步骤是在Jenkins中启动构建作业的触发",该作业从TFS中获取源代码并进行编译,问题是该代码没有门控签入.

例如:

  1. 我的代码库为"A",并且编译正常.
  2. 我正在推动新的更改(将其称为"B"增量),这会破坏构建(无效的c#语法).
  3. 这会触发TFS中的一个构建,该构建调用Jenkins作业,该作业仅使用"A"代码(不包含"B"增量).
  4. Jenkins成功地构建了代码(仅基于"A"),然后TFS将该代码成功地标记为该构建,并将错误的"B" delta代码放入其中.
  5. 现在,每个变更集(包括对此问题的修复)将导致下一个版本中断,因为jenkins将采用错误的"B"代码,并且始终会失败.

有没有办法让詹金斯使用当前的门禁签到代码来获取代码?

我想使用Jenkins构建而不是TFS的原因是,Jenkins中.Net Core 2.0的构建过程比TFS快了大约 X4 ,而我们的源代码控制是在TFS中进行管理的. /p>

使用: TFS-版本15.117.26714.0

解决方案

为避免此问题,您可以在Jenkins Job任务排队之前添加VS Build任务:

I'm trying to make Jenkins pull TFS gated checkin code but failed to do so.

I have managed to add a Jenkins build step in TFS, This build step is a "trigger" to start a build job in Jenkins, This job taking the source code from TFS and compile it, the problem is that this code is without the gated checkin.

For example:

  1. My code base is "A" and compilation is working.
  2. I'm pushing new change (lets call it "B" delta) that should break the build (invalid c# syntax).
  3. This trigger a build in TFS which call Jenkins job, this job taking only "A" code (without "B" delta).
  4. Jenkins succsusfully building the code (base only on "A") which TFS then mark this build as succsusfully and let the bad "B" delta code inside.
  5. Now every change set including a fix to this one will cause the next build to break because jenkins will take the bad "B" code and always fail.

Is there a way to make Jenkins take the code with the current gated checkin?

The reason I want to use Jenkins build instead of TFS is that the build process for .Net Core 2.0 in Jenkins is about X4 faster then TFS, and our source control is managed in TFS.

Using: TFS - Version 15.117.26714.0

解决方案

To avoid this issue, you could add a VS Build task before queue Jenkins Job task:

这篇关于Jenkins可以拉出TFS门控的签入代码进行构建吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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