这是一个有点……徒劳的问题,但是 BuildBot 的输出并不是特别好看……
This is a slightly.. vain question, but BuildBot's output isn't particularly nice to look at..
例如,相比于..
..和其他人,BuildBot 看起来相当.. 过时
..and others, BuildBot looks rather.. archaic
我目前正在使用 Hudson,但它非常以 Java 为中心(尽管使用 本指南,我发现它比 BuildBot 更容易设置,并产生了更多信息)
I'm currently playing with Hudson, but it is very Java-centric (although with this guide, I found it easier to setup than BuildBot, and produced more info)
基本上:是否有任何针对 python 的持续集成系统,可以生成大量闪亮的图表等?
Basically: is there any Continuous Integration systems aimed at python, that produce lots of shiny graphs and the likes?
更新: 自此以来,Jenkins 项目已取代 Hudson 作为该软件包的社区版本.原作者也已移至该项目.Jenkins 现在是 Ubuntu/Debian、RedHat/Fedora/CentOS 等的标准软件包.以下更新基本上仍然是正确的.Jenkins 的出发点是不同的.
Update: Since this time the Jenkins project has replaced Hudson as the community version of the package. The original authors have moved to this project as well. Jenkins is now a standard package on Ubuntu/Debian, RedHat/Fedora/CentOS, and others. The following update is still essentially correct. The starting point to do this with Jenkins is different.
更新:在尝试了一些替代方案后,我想我会坚持使用 Hudson.Integrity 很好很简单,但是非常有限.我认为 Buildbot 更适合拥有大量的构建从站,而不是像我使用的那样在一台机器上运行所有东西它.
Update: After trying a few alternatives, I think I'll stick with Hudson. Integrity was nice and simple, but quite limited. I think Buildbot is better suited to having numerous build-slaves, rather than everything running on a single machine like I was using it.
为 Python 项目设置 Hudson 非常简单:
Setting Hudson up for a Python project was pretty simple:
java -jar hudson.war
http://localhost:8080
git
路径)easy_install
安装 nosetests
nosetests --with-xunit --verbose
**/nosetests.xml
java -jar hudson.war
http://localhost:8080
git
path in the Hudson global preferences)nosetests
via easy_install
if it's not alreadynosetests --with-xunit --verbose
**/nosetests.xml
这就是我们所需要的.您可以设置电子邮件通知,插件值得一看.我目前用于 Python 项目的一些:
That's all that's required. You can setup email notifications, and the plugins are worth a look. A few I'm currently using for Python projects:
nosetests --with-coverage
(这会将输出写入 **/coverage.xml
)nosetests --with-coverage
(this writes the output to **/coverage.xml
)你可能想看看 Nose 和 Xunit 输出插件.你可以让它运行你的单元测试,并使用这个命令检查覆盖率:
You might want to check out Nose and the Xunit output plugin. You can have it run your unit tests, and coverage checks with this command:
nosetests --with-xunit --enable-cover
如果您想走 Jenkins 路线,或者如果您想使用另一个支持 JUnit 测试报告的 CI 服务器,这将很有帮助.
That'll be helpful if you want to go the Jenkins route, or if you want to use another CI server that has support for JUnit test reporting.
同样,您可以使用 针对 Jenkins 的违规插件 捕获 pylint 的输出
Similarly you can capture the output of pylint using the violations plugin for Jenkins
这篇关于“漂亮"Python 的持续集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!