Hudson——周末构建与连续构建(短时间)

发布于 2024-09-11 10:21:43 字数 247 浏览 2 评论 0原文

一旦对任何存储库进行更改,我就会让 Hudson 运行构建。

有一些构建我想在周末每周运行一次,但由于更特殊的测试需要更长的时间,而且我不想每次源存储库发生更改时都运行一次。

有没有办法选择要运行的测试,或者让它查找我在构建之前设置的一些环境变量,以便它知道运行其他测试。

或者最好将这些长时间的测试分离到它们自己的存储库中,并创建一个新的周末构建。我用maven而不是ant。

想法?

请并谢谢你。

I have Hudson to run builds as soon as changes have been made to any of the repositories.

There are some builds that I want to run once a week during the weekends, but with more special tests which take longer and I wouldn't want to run every time there is a change in one of the source repositories.

Is there a way to pick and choose which tests to run or have it look up some environment variable that i set up before the build so it knows to run the additional tests.

Or is it best to separate those long tests into their own repository, and create a new weekend build. I use maven not ant.

Thoughts?

Please and thank you.

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

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

发布评论

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

评论(3

夏日落 2024-09-18 10:21:43

有没有一种方法可以选择要运行的测试,或者让它查找我在构建之前设置的一些环境变量,以便它知道运行其他测试。

Maven Surefire 插件 确实支持 测试的包含和排除,以便您可以将特定配置放入配置文件中并配置 Hudson使用此配置文件运行您的周末构建。我认为这是实现您的用例的方式。

Is there a way to pick and choose which tests to run or have it look up some environment variable that i set up before the build so it knows to run the additional tests.

The Maven Surefire Plugin does support Inclusions and Exclusions of Tests so you could put a specific configuration in a profile and configure Hudson to run your weekend builds using this profile. This is in my opinion the way to implement your use case.

再浓的妆也掩不了殇 2024-09-18 10:21:43

你如何进行测试?你调用mvn clean install并且maven有魔力吗?如果是这样,您可以通过运行 mvn clean install -Dmaven.test.skip=true 来跳过测试。据我所知,这至少会跳过单元测试。如果您拥有的所有测试都是单元测试,则必须将它们与构建阶段分开。您可以将目标定为 mvn 构建。

这绝对是一个maven问题。首先习惯maven生命周期或者找更了解maven的人。黄金法则是,当您能够从命令行运行构建步骤时,您也可以使用 Hudson 来完成它。

How do you run your test? Do you call mvn clean install and maven does it's magic? If so you can skip testing by running mvn clean install -Dmaven.test.skip=true. As far as I know this skips at least the unit tests. If all tests that you have are unit tests, you have to separate them out of the building phase. You can goals to a mvn build.

This is definitely a maven issue. Get accustomed with the maven life cycle first or find someone who knows maven better. The golden rule is, when you are able to run the build steps from command line, you can accomplish it with Hudson as well.

预谋 2024-09-18 10:21:43

我将一个变量从 Hudson 作业传递到 Ant 任务。

I'd pass a variable from Hudson job down to the Ant task.

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