如何为两个单独的版本配置 CruiseControl?

发布于 2024-09-19 10:57:24 字数 282 浏览 2 评论 0原文

我正在尝试将 CruiseControl 配置为在每天凌晨 3:00 每次修改源代码时构建项目。这是我到目前为止在 project.xml 中所做的(它不起作用,日常构建没有完成):

...
<schedule interval="120">
  <maven2 … />
  <maven2 … time="0300"/>
</schedule>
...

我做错了什么?

I'm trying to configure CruiseControl to build the project on every modification of source code and every day at 3:00am. This is what I've done so far in project.xml (and it doesn't work, daily builds are not done):

...
<schedule interval="120">
  <maven2 … />
  <maven2 … time="0300"/>
</schedule>
...

What am I doing wrong?

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

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

发布评论

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

评论(5

牵你手 2024-09-26 10:57:24

我通常使用 cc.net,但是当我正确理解文档时,您有两个选择:

  • 使用 2 个项目
  • requireModifications 属性设置为 false (这不完全是您想要的)

您的配置会发生以下情况:“修改”构建将全天运行,因此在凌晨 03:00 CruiseControl 无法检测到任何修改(至少我认为如此)。由于没有任何修改,因此不会运行每日构建。

来自文档

...它通常不是
混合时间构建和
在同一项目中进行多次构建
多个构建将“吃掉”所有
在被检测到之前发生变化
基于时间的构建。

I usally use cc.net, but when I understand the documentation correctly you have two options:

  • Use 2 projects
  • Set the requireModifications attribute to false (which is not exactly what you want)

What happens with your configuration is the following: The "modification" build will be run throughout the day and thus at 03:00 am CruiseControl cannot detect any modifications (at least I would assume so). As there are no modifications the daily build is not run.

From the documentation:

... it is usually not a
good idea to mix time builds and
multiple builds in the same project as
the multiple builds will "eat" all the
changes before they can be detected by
the time based builds.

野却迷人 2024-09-26 10:57:24

据我了解 CruiseControl 不可能做到这一点:(

As I understand there is no possibility in CruiseControl to do this :(

为你拒绝所有暧昧 2024-09-26 10:57:24

我们监听 gitrepo 中的更改并每天晚上进行夜间构建,我们这样做:

<schedule interval="${buildtime}">
  <ant antscript="ant.bat"
   buildfile="build.xml"
  </ant>
</schedule>
<bootstrappers>
  <gitbootstrapper localWorkingCopy="${checkout_folder}"/>
</bootstrappers>
<modificationset quietperiod="${quiettime}"
         Ignorefiles="${ignorelist}">
  <git localWorkingCopy="${checkout_folder}"/>
  <timebuild username="Cruisecontrol nightwatch"
     time="0300"
     property="build_nightly"/>
</modificationset>

正如您在此处看到的,这里的线索是定时构建放置在 modificationset 中,而不是 计划,因此在每个计划时间它都会检查 git 存储库是否已更改或是否到了进行夜间构建的时间。

We listen for changes in a gitrepo and do nightly builds every night, we do it like this:

<schedule interval="${buildtime}">
  <ant antscript="ant.bat"
   buildfile="build.xml"
  </ant>
</schedule>
<bootstrappers>
  <gitbootstrapper localWorkingCopy="${checkout_folder}"/>
</bootstrappers>
<modificationset quietperiod="${quiettime}"
         Ignorefiles="${ignorelist}">
  <git localWorkingCopy="${checkout_folder}"/>
  <timebuild username="Cruisecontrol nightwatch"
     time="0300"
     property="build_nightly"/>
</modificationset>

As you see here the clue here is that the timed build is placed in the modificationset, not the schedule, so at each scheduled time it will check if either the git repo has changed or the time has come to do the nightly build.

ゞ记忆︶ㄣ 2024-09-26 10:57:24

我正在为 CruiseControl.net 使用 ScheduleTrigger

不久前,我将 CI 服务器从 CC.net 迁移到 TeamCity - 请看一下(他们也有免费版本)。配置起来更好、更容易(告别那些巨大的、难以管理的 XML 配置文件;-)

I was using ScheduleTrigger for CruiseControl.net.

Some time ago I've migrated CI server from CC.net to TeamCity - do take a look at it (they have free version as well). It's much better and easier to configure (say goodbye to those huge unmanageable XML config files;-)

野味少女 2024-09-26 10:57:24

我想到了一个办法,将构建脚本拆分出来制作插件。

例如: https://github.com/LightWare/LightCI/blob/master/配置.xml

I thought of a way, the build script split to make plug-ins.

For example: https://github.com/LightWare/LightCI/blob/master/config.xml

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