如何覆盖 Cruisecontrol 内部版本号

发布于 2024-07-28 22:13:26 字数 142 浏览 5 评论 0原文

我们使用 Cruisecontrol 作为我们的 CI 工具。 我想知道如何覆盖巡航控制分配的内部版本号。

原因是: 我们有针对不同模块运行的并行巡航控制会话,我不想为每个模块使用不同的内部版本号,而是使用相同的版本号来关联它。

We are using cruisecontrol as our CI tool. I would like to know how to override the build numbers assigned by the cruisecontrol.

The reason is:
We have parallel cruisecontrol sessioon running for different modules and i don't want to have different build numbers for each module rather same number to relate it.

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

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

发布评论

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

评论(4

感受沵的脚步 2024-08-04 22:13:26

对于提出这个问题的人来说,答案可能来得太晚了。 但我在这里记录了解决方案,以便其他可能需要此信息的人受益。

我刚刚用我们新升级的(2.8.2)巡航控制系统尝试过这一点,它确实工作得很好。

  1. 使用 labelincrementer 任务以这种方式获得一些灵活性:
    在您的 config.xml 上使用以下任务:
    < 项目>

    < labelincrementer defaultLabel="my.cruise.build.1" />

    /project>

  2. 确保您的 Cruise 主目录中没有任何序列化的构建文件(该文件的名称为 <your_project>.ser。如果您在之前的构建尝试中看到此文件,不要担心它会被重新创建。这是为了防止构建任务查看此文件并增加以前格式的数字,而不是您刚刚在 config.xml 中指定的新格式。

  3. 从文件中删除/清理所有日志文件。日志目录(来自 <cchome>/logs/<project_name> 区域)这是为了避免构建任务引用之前的标签值所必需的构建。

按照指定完成所有这些操作后,运行构建,您将按照您在“my.cruise.build.1”中指定的方式看到下一个构建的标签,

如果您需要更多信息,请查找此页面:http://cruisecontrol.sourceforge.net/main/configxml.html#labelincrementer

The answer may be coming too late for the person that asked this question. But I am recording the solution here for the benefit of anyone else that may need this information.

I just tried this out with our newly upgraded (2.8.2) cruisecontrol and it really works fine.

  1. Use the labelincrementer task to get some flexibility in this fashion:
    On your config.xml use the task:
    < project >

    < labelincrementer defaultLabel="my.cruise.build.1" />

    </project>

  2. Make sure you dont have any serialized build files in your cruise home directory (the file will have a name <your_project>.ser. If you do see this file from your previous build attempts, delete it. Dont worry it will get recreated. This is required to prevent the build tasks form peekinginto this file and upping the number in the previous format rather than the new one you just specified in the config.xml

  3. Remove/cleanup all log files from the log directory (from <cchome>/logs/<project_name> area) This is required to avoid the build tasks from referring into the label values form the previous builds.

Once you have done all of this as specified, run the build and you will see the label for the next build the way you specified in "my.cruise.build.1"

Look up this page if you need more info: http://cruisecontrol.sourceforge.net/main/configxml.html#labelincrementer

眼眸里的那抹悲凉 2024-08-04 22:13:26

AFAIK,使用标准 CruiseControl (没有自定义插件)这是不可能的。

最接近的是“remoteProjectLabeller”标签器,它将使用另一个项目的构建标签:

    <labeller type="remoteProjectLabeller">
        <project>OtherProject</project>
    </labeller> 

AFAIK, this is not possible using standard CruiseControl (without custom plugins)

The closest thing is the "remoteProjectLabeller" labeller, which will use the build label of another project:

    <labeller type="remoteProjectLabeller">
        <project>OtherProject</project>
    </labeller> 
失退 2024-08-04 22:13:26

我也在做同样的事情。 对我来说,最简单明显的解决方案是在 2 个 config.xml 文件上运行 2 个 CC 实例,每个项目一个。 他们每个人都会有自己的内部版本号、存储库、定制等。

I'm doing the same thing. The easy obvious solution for me was to have 2 instances of CC running on 2 config.xml files, one for each project. They'll each get their own build number, repository, customization, etc.

披肩女神 2024-08-04 22:13:26

如果您使用 Subversion,有一种方法可以在 svn 中标记您的构建,然后检索该标签以在其他构建中使用。 不幸的是,我从未设置过它,只见过它的使用,所以我无法提供有关如何实现它的任何细节。

If you are using Subversion, there is a method of labeling your build in svn and then retrieving that label for use in other builds. Unfortunately, I have never set this up, only seen it used, so I can't offer any details on how to implement it.

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