Hudson 不要为失败的构建增加构建号
我想阻止 hudson 增加失败构建的构建号。我认为增加失败构建的构建号没有任何价值,因为它们不可用。
我希望这是配置中的一个简单设置,但找不到它,而且我找不到解决方案。
有人可以告诉我这是否可能吗?
I would like to stop hudson from incrementing the build number for failed builds. I see no value in incrementing the build number for failed builds as they are not usable.
I expect this is a simple setting in the config but cannot find it and I can't find a solution on SO.
Could someone please let me know if this is possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
构建就是构建,无论成功还是失败,不是吗?内部版本号与发布号、版本号或您的组织的任何称呼不同。
此外,Hudson 存储所有构建的完整日志,以便您可以轻松地引用它们。这有助于您解决构建损坏的问题。如果您没有这个,并且连续有多个损坏的构建,您如何知道每个构建的问题是什么?
恕我直言,您找不到解决方案,因为这既是您不应该做的事情,也是当前无法完成的事情。
A build is a build, whether it's successful or failed, isn't it? Build number is different from release number, or version number, or whatever your organization calls it.
Additionally, Hudson stores the entire logs from all builds so you can easily refer back to them. This aids you in your ability to go fix the problems with broken builds. If you didn't have that, and you had multiple broken builds in a row, how could you tell what the problem was with each of the builds?
IMHO, you can't find a solution because it's something both that you shouldn't be doing, and cannot currently be done.
听起来您正在尝试自动化滚动次要版本#。正如其他人提到的,您不应该使用 hudson 内部版本号。
如果您使用Maven,您可以使用发布插件,以便在成功构建时提高最低有效版本号(即 1.0.x,其中 x 递增)。
Maven 发布插件 还将把新版本签入到源代码管理中(使用货车)并创建一个标签。
如果您不使用 Maven,我确信还有其他构建工具可以执行类似的操作。
It sounds like your trying to automate a rolling minor release #. As others have mentioned you shouldn't use the hudson build number.
If you are using Maven you can use the release plugin so that the least significant version number is bumped (ie 1.0.x where x is incremented) on successful builds.
The Maven release plugin will also checkin the new version # into source control (using wagon) and create a tag.
If you are not using Maven I'm sure there are other build tools that do something similar.