.NET 使用 Cruisecontrol.net 自动构建 + nant - 多重装配结构/最佳实践

发布于 2024-07-12 09:18:29 字数 1013 浏览 6 评论 0原文

我正在使用几个共享的 .NET 程序集和一个通用的 Web 应用程序进行一些工作,我希望在我们的 CC.NET/NAnt 构建环境中更好地处理它们。

目前,我们有几个 .NET 程序集(我们在客户端项目中使用的共享通用代码)存在于 SCM 中不同存储库(顺便说一下 Vault)内的不同 .NET 解决方案中。 它们都是在 CC.NET 下单独配置的,因此我们目前对它们的构建和部署有相当大的控制权。

我们开发了一个 CMS 系统,该系统使用一些 .NET 程序集,并包括一个通用管理网站项目和一个模板网站示例项目。 在这一解决方案中,我们有以下需要单独管理的元素:

  • 管理界面不依赖于 .NET,因此它是基于模板的,我们目前正在为其开发一个 PHP 后端。
  • CMS 共享程序集构建在我们其他常见的公司范围程序集之上。
  • 控制每个主要 CMS 构建/版本中的功能。

我希望此解决方案的构建输出成为 Visual Studio 模板,当我们向代码库添加功能时,我们可以使用该模板来开发其他客户端站点并更好地管理 CMS 本身内的版本更改。

我对这一切有一个粗略的方法,并且认为这是可以实现的,但是,我想开放这个主题进行讨论,看看其他人在管理多个解决方案的构建和部署时正在做什么。

我们的主要考虑因素是:

  • 我们是否利用 CC.NET 中的集成队列功能来确保构建顺序并在构建时将 CMS 所需的程序集汇集在一起​​?
  • 在 CMS 客户端站点内进行调试,即当客户端解决方案是基本 CMS 系统的版本并因此是独立的时,单步执行共享程序集的代码。
  • 当使用共享程序集时开发和扩展 CMS,即我们是否在开发期间(跨源代码控制存储库)将程序集项目添加到主干解决方案中,然后依靠构建将其整合在一起,还是我们完全使用不同的方法?
  • 人们可能经历过的任何其他问题可能会改变我们的思维方式?

希望这个问题不太模糊,并且你们中的一些人已经处理过这些问题。 期待听到大家的经历。

非常感谢! 蒂姆

I'm doing some work with several shared .NET assemblies and a generic web application that I would like to handle better in our CC.NET/NAnt build environment.

Currently, we have several .NET assemblies (shared common code that we use in client projects) that exist in different .NET solutions within different repositories in our SCM (Vault incidentally). They are all configured under CC.NET separately so we have a decent amount of control over their build and deployment at present.

We have developed a CMS system that uses some of the .NET assemblies and includes a common administration website project and a template website example project. Out of this one solution we have the following elements that need to managed separately:

  • Admin interface is not tied to .NET so it is template based and we are developing a PHP backend for it currently.
  • CMS shared assembly build on top of our other common company wide assemblies.
  • Control over functionality within each major CMS build/release.

I'd like the build output of this solution to be a Visual Studio template, which we can use to develop other client sites and better manage version changes within the CMS itself, as we add features to the codebase.

I have a rough approach for all this and think it is achievable, however, I wanted to open this topic up for discussion and see what everyone else is doing when it comes to managing the build and deployment of multiple solutions.

Main considerations for us are:

  • Do we make use of the integration queue functionality in CC.NET to ensure a build order and pull together the assemblies we need for the CMS at build time?
  • Debugging within a CMS client site i.e. stepping into the shared assemblies' code when the client solution is a version of the base CMS system and therefore separate.
  • Developing and extending the CMS when it uses shared assemblies i.e. do we add the assembly projects to the trunk solution during development (across source control repositories) and then rely on the build to pull it together or do we use a different approach entirely?
  • Any other issues people might have experienced that could change our way of thinking?

Hopefully this question isn't too vague and some of you will have dealt with these issues. Look forward to hearing everyones experiences.

Many thanks!
Tim

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月野兔 2024-07-19 09:18:29

不幸的是,我无法回答您的所有观点,但让我从这一点开始:

  • 我们是否利用 CC.NET 中的集成队列功能来
    确保构建顺序并齐心协力
    CMS 所需的程序集位于
    构建时间?

简短的回答是——是的,你应该这样做。 队列属性确保 CC.NET 运行实例中的构建顺序,并为您提供相互依赖的构建的序列化。 要指定哪些项目相互依赖,您应该使用项目触发器 。 请勿依赖queuePriority 来执行此任务。

您很可能应该在构建时提取构建所需的部分。 除非您对个人构建有一些时间限制。

关于:

  • 在使用共享程序集时开发和扩展 CMS,即我们是否在开发期间(跨源代码控制存储库)将程序集项目添加到主干解决方案中,然后依靠构建将其整合在一起,或者我们是否使用完全不同的方法?

我从根本上反对在主干中分发二进制文件,除非它是一些不需要经常更新/更改的库。 如果您自己构建共享程序集,则应考虑从构建服务器上的工件中提取它们。

I unfortunately cannot answer all of your points, but let me start with this one:

  • Do we make use of the integration queue functionality in CC.NET to
    ensure a build order and pull together
    the assemblies we need for the CMS at
    build time?

The short answer is -yes, you should. The queue attribute ensures a build order within the running instance of CC.NET and is gives you serialization of the builds that depend on each other. For specifying which projects depend on each other, you should use project triggers. Do not rely on the queuePriority for this task.

You shold most likely pull the pieces you need to do the build at build time. Unless you have some time constraints on your individual builds.

Re:

  • Developing and extending the CMS when it uses shared assemblies i.e. do we add the assembly projects to the trunk solution during development (across source control repositories) and then rely on the build to pull it together or do we use a different approach entirely?

I'm fundamentally against distributing binaries in the trunk unless it's some libraries that does not need to be updated/changed on a frequent basis. If you build the shared assemblies yourself, you should consider pulling them from the artifacts on the build server(s).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文