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

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

问题描述

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

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天全站免登陆