2012-03-28 184 views
3

您推荐在Grails + Tomcat(+ Ubuntu)环境中持续集成的工具是什么?詹金斯?哈德森?还有别的吗?我不是在寻找任何复杂的东西......简单的做得很好。与Grails持续集成

回答

8

我刚在Jenkins(在debian上运行)中配置了一个grails作业。我无法说出其他CI服务器的情况..我也知道apache连续体,但多年没有使用它。

对于Debian/Ubuntu的,你可以在你的/etc/apt/sources.list只需添加

deb http://pkg.jenkins-ci.org/debian binary/ 

,然后通过 apt-get的更新& &易于得到安装詹金斯

安装詹金斯用户jenkins被创建。

您可能要更改默认的配置 的/ etc /默认/詹金斯 使用其他前缀(即其设置为詹金斯这样URL将会像http://localhost:port/jenkins)端口或JENKINS_HOME。

默认jenkins主页是/ var/lib/jenkins。

您可以通过init.d脚本启动/停止/重新启动jenkins(即/etc/init.d/jenkins restart)。

里面jenkins然后你可以安装“Jenkins Grails插件”并添加一个新的“自由风格的软件项目”,然后在其配置中(部分构建)执行“添加构建步骤 - >使用Grails构建”。

然后,对于“目标”,您可以输入“clean test-app -unit”(添加适合的目标)等内容。

在“发布的Junit结果报告”使用像YOUR_PROJECT /目标/测试报告/测试 - TestSuites.xml

另外的路径不要忘了安装“查克·诺里斯插件”詹金斯...这是有史以来最重要的插件!

如果你也想用的Apache2 +詹金斯包括在你的Apache站点配置是这样的:

Include /etc/jenkins/apache2.conf 

,并创建包含以下内容的文件/etc/jenkins/apache2.conf:

ProxyPass /jenkins http://localhost:8080/jenkins 
ProxyPassReverse /jenkins http://localhost:8080/jenkins 
ProxyPassReverse /jenkins http://example.org/jenkins 
ProxyPreserveHost On 
ProxyRequests Off 
ProxyPassReverseCookiePath /jenkins /jenkins 
<Proxy http://localhost:8080/jenkins*> 
Order deny,allow 
Allow from all 
</Proxy> 

你必须激活代理模块:

a2enmod proxy proxy_http 

,然后重新启动的Apache2:

/etc/init.d/apache2 restart 
+0

太棒了!感谢彻底的回应。只要我有机会尝试一下,我会将其标记为解决方案。 – loeschg 2012-03-28 17:04:31

-3

Bamboo是最好的。我曾与大多数CI配合工作。