预构建任务 - 删除CruiseControl.NET中的工作副本 [英] Pre-build task - deleting the working copy in CruiseControl.NET

查看:233
本文介绍了预构建任务 - 删除CruiseControl.NET中的工作副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在工作中设置一个持续集成环境。我们使用VisualSVN Server和CrusieControl.NET。偶尔,构建将失败,并且症状是CruiseControl.NET工作副本中存在冲突。我相信这是由于我已经设置Visual Studio解决方案的方式。希望我们在这个环境中运行的项目越多,我们对如何设置它们的理解就越好,所以我不会质疑为什么在这个阶段发生冲突。要修复builds我删除工作副本和强制一个新的构建 - 这工作每次(目前)。所以我的问题是:删除工作副本是持续集成构建过程的有效部分,我该如何做?

I'm currently in the process of setting up a continuous integration environment at work. We are using VisualSVN Server and CrusieControl.NET. Occasionally a build will fail and a symptom is that there are conflicts in the CruiseControl.NET working copy. I believe this is due to the way I've setup the Visual Studio solutions. Hopefully the more projects we run in this environment the better our understanding of how to set them up will be so I'm not questioning why the conflicts happen at this stage. To fix the builds I delete the working copy and force a new build - this works every time (currently). So my questions are: is deleting the working copy a valid part of a continuous integration build process, and how do I go about it?

我尝试过的解决方案包括MSTask并从命令行调用delete,但我没有任何运气。

I've tried solutions including MSTask and calling delete from the command line but I'm not having any luck.

对不起是这么冗长 - 好工作这是一个测试版:)

Sorry for being so wordy - good job this is a beta :)

推荐答案

在构建之前或之后执行完全删除是一个好的做法。这意味着您的构建环境没有机会选择过期文件。

Doing a full delete before or after your build is good practice. This means that there is no chance of your build environment picking up an out of date file. Your building exactly against what is in the repository.

删除工作副本是可能的,就像我用Nant做的一样。

Deleting the working copy is possible as I have done it with Nant.

在Nant我会有一个干净的脚本在自己的文件夹中,我想删除的一个,然后从CC.net调用它。

In Nant I would have a clean script in its own folder outwith the one I want to delete and would then invoke it from CC.net.

我假设这对于批处理文件也是可能的。查看rmdir命令 http://www.computerhope.com/rmdirhlp.htm

I assume this should also be possible with a batch file. Take a look at the rmdir command http://www.computerhope.com/rmdirhlp.htm

@pauldoo

我更喜欢我的CI服务器做一个完全删除,因为我不想要任何惊喜当我去做一个发布版本,这应该总是从一个干净的状态。但它应该能够处理两者,没有理由为什么不

I prefer my CI server to do a full delete as I don't want any surprise when I go to do a release build, which should always be done from a clean state. But it should be able to handle both, no reason why not

这篇关于预构建任务 - 删除CruiseControl.NET中的工作副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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