Hudson——周末构建与连续构建(短时间)
一旦对任何存储库进行更改,我就会让 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Maven Surefire 插件 确实支持 测试的包含和排除,以便您可以将特定配置放入配置文件中并配置 Hudson使用此配置文件运行您的周末构建。我认为这是实现您的用例的方式。
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.
你如何进行测试?你调用
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 runningmvn 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.
我将一个变量从 Hudson 作业传递到 Ant 任务。
I'd pass a variable from Hudson job down to the Ant task.