Orchard CMS 模块开发以及与 TeamCity 的持续集成

发布于 2024-12-17 18:03:18 字数 666 浏览 8 评论 0原文

我已经使用 Orchard CMS 进行开发几个月了(并且很喜欢它),并且启动我的网站的时间很快就到了。到目前为止,我只是在我的 BitBucket 存储库中进行单独开发,在必要时进行分叉,而不是做任何太花哨的事情。一旦我发布了,我确实需要了解我的模块和主题在生产中使用的确切版本。我认为构建服务器中的版本化包是实现此目标的最佳方法。

目前,我的存储库包含整个 Orchard 实例的源代码(减去 App_Data 文件夹),以及一个包含我的模块和主题项目的解决方案文件。我的模块依赖于 App_Data/Dependencies 文件夹中的其他模块。

我的问题是,这是实现持续集成的最佳方法吗?

我在 TeamCity 下构建了解决方案,但我的存储库中没有包含 App_Data 文件夹,因此我至少需要加载设置页面,以便填充 Dependencies 目录(由于某种原因,这不会发生在我的构建服务器上) ?似乎只有动态编译才能发挥作用?)

任何想法或帮助将不胜感激。

更新:

我决定将 lib 文件夹添加到我的解决方案中,并将所有依赖程序集存储在那里。然后,我的存储库将仅包含我的模块/主题所需的项目。然后,CI 服务器在构建解决方案时不会出现任何问题,我只需将存储库克隆到 Orchard 实例中即可轻松开发(这意味着我的解决方案必须包含 Modules 和 Themes 目录)。

I've been developing with Orchard CMS for a few months now (and love it) and the time for launching my website is fast approaching. So far I've just been developing solo out of my BitBucket repo, forking where necessary, not doing anything too fancy. Once I have released though I really need to have a handle on exactly what versions of my modules and themes are in use in production. I figure versioned packages out of my build server is the best way to achieve this.

Currently my repo consists of the source for the entire Orchard instance (minus the App_Data folder), with a solution file that includes the projects that are my modules and themes. My modules take on dependencies of other modules from the App_Data/Dependencies folder.

My question is, is this the best approach to achieve Continuous Integration?

I have my solution building under TeamCity, but I don't include the App_Data folder in my repo, so I need to at least load the setup page so the Dependencies directory gets populated (which doesn't happen on my build server for some reason? Seems only dynamic compilation kicks in for everything?)

Any thoughts or assistance would be greatly appreciated.

UPDATE:

I have decided I will add a lib folder to my solution and store all dependent assemblies there. I will then have my repo consist of only the projects required for my modules / themes. The CI server will then have no problems building the solution, and I can just clone the repo into an Orchard instance for easy development (this means my solution will have to contain a Modules and Themes directory).

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

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

发布评论

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

评论(1

浪菊怪哟 2024-12-24 18:03:18

我使用了以下方法

  • 将 Orchard 二进制文件添加到存储库中,无需任何源代码,只需在 orchard 项目站点 中分发即可
  • < p>在单独的目录中创建我的解决方案和所有相关项目,因此目前目录结构如下所示:

    在此处输入图像描述

  • 然后将模块项目放在 orchard/modules< /code> 包含所有内容的文件夹源和 .proj 文件

  • 将模块项目中的引用添加到 orchard/bin 中以获取任何内容
    orchard 特定的内容

  • 手动将模块二进制文件添加到 App_Data/Dependency 文件夹以便能够引用它们

这种方法的改进之一是关闭动态编译并仅存储模块二进制文件,但这需要在构建脚本中配置输出 bin 路径和其他操作。

好处

  • 您的存储库中没有任何果园源,除了
    模块(但这可以通过关闭动态编译来解决)。
  • 您可以轻松地几乎独立地升级 Orchard 二进制文件和模块
  • 构建所需的时间更少

I used the following approach.

  • add Orchard binaries to the repository without any source codes, just in the for they are distributed at the orchard project site
  • create my solution and all related projects in separate directory, so at the moment dir structure looks like this:

    enter image description here

  • then place your modules projects under orchard/modules folder with all sources and .proj files

  • add references from your module projects to orchard/bin for any
    orchard-specific stuff

  • add module binaries manually to App_Data/Dependencies folder to be able to reference them

One of the improvements of this approach is to turn off dynamic compilation and store only module binaries, but this will require configuration of the output bin path and additional actions in the build script.

Benefits

  • You don't have any orchard sources in your repository except of the
    modules (but this is solvable by turning off dynamic compilation).
  • You can easily upgrade orchard binaries and modules almost independently
  • The build takes less time
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文