当另一个构建失败时如何阻止构建?
我在 Hudson 中为单个解决方案创建了许多构建配置(例如发布、调试、测试) 当我犯错时,每个构建配置都会收到 1 封构建失败的电子邮件。 我想收到一封电子邮件。 我认为如果我能让一个构建依赖于另一个构建的成功或失败,我可以收到更少的电子邮件。
怎么做呢?
顺便说一句:我使用 MsBuild、Subversion 和 NAnt
I have created many build configurations in Hudson for a single solution (eg. Release, Debug, Test)
When I commit something wrong, I receive 1 build failed e-mail for every build configuration.
I would like to receive a single e-mail.
I think if I could to make one build dependent on the success or failure of another, I could receive less e-mails.
How to do that?
BTW: I use MsBuild, Subversion and NAnt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来您对于配置为始终构建的同一组源代码有多个作业(构建配置)。正如其他人所建议的,您可以使用构建触发器将这些作业链接在一起。但是,如果所有作业都在每次提交时运行,我建议将这些作业合并为具有多个步骤的单个作业。这样,当一个步骤失败时,整个构建都会失败,不会花费不必要的 Hudson 周期,并且您不会收到多余的电子邮件。要将步骤添加到构建,请单击“添加构建步骤”并选择“调用 Ant”(或您希望其执行的任何其他操作)。
It sounds like you have multiple jobs (build configurations) for the same set of source code that are configured to always build. You could, as someone else suggested, use build triggers to chain these jobs together. However, if all the jobs run on each commit, I suggest combining the jobs into a single job with multiple steps. That way when one step fails, the entire build will fail, no unnecessary Hudson cycles will be spent, and you will not receive redundant emails. To add steps to a build, click "Add build step" and select "Invoke Ant" (or whatever other action you want it to take).
您可以使用构建触发器“在构建其他项目之后构建”将项目置于彼此的上游或下游。然后,您通常先进行较轻的构建(例如简单编译)。
You can use the build trigger "build after other projects are build" to put projects up- or downstream from one another. Then you typically let the lighter builds go first (like simple compile).