如何使用TFS实现构建管道 [英] How can I implement a build pipeline with TFS

查看:892
本文介绍了如何使用TFS实现构建管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用TFS实现构建管道。



我们已经有TFS在每次提交后构建我们的项目。但是构建需要太长时间,所以我们希望将构建分为两个阶段。连续集成文献提出了这种技术。



所以我要找的是做下面的事情。




  • 开发人员检查其源代码。

  • TFS自动触发构建以编译代码,运行一些基本测试(我们已经有了)。开发人员得到快速反馈,他的更改没有打破明显的东西。

  • 接下来,如果构建成功,则触发新的TFS任务/构建,它接收前一阶段的工件,并运行一些更耗时的测试。



有关如何实现此功能的任何想法?



- Alexander

解决方案

1)编写一个监听BuildCompleted事件的服务。 IIS网络服务示例代码自行代管的WCF示例代码。在您的事件处理程序中,调用TFS Build API 启动定义其他任务的单独构建类型,或直接从此处执行自定义代码。



2)使用TFS注册您的服务,添加成功构建的服务器端过滤 。 p>

I try to implement a build pipeline using TFS.

We already have TFS building our projects after each commit. But the build take too long so we would like to split the build into two stages. Continuous integration literature suggest this technique.

So what I am looking for is something to do the following.

  • Developer checks in his source code.
  • TFS automatically triggers a build to compile the code and run some basic tests (we already have that). The developer gets quick feedback that his changes did not break something obvious.
  • Next if the build succeeded a new TFS task/build is triggered which takes the artifacts from the previous stage and runs some more time consuming tests.

Any ideas on how to implement this?

-- Alexander

解决方案

1) Write a service that listens for the BuildCompleted event. IIS webservice sample code. Self-hosted WCF sample code. In your event handler, either call the TFS Build API to kick off a separate build type that defines additional tasks, or simply execute custom code directly from here.

2) Register your service with TFS, adding a server side filter on successful builds.

这篇关于如何使用TFS实现构建管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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