与Grails持续集成

时间:2012-03-28 16:22:17

标签: grails continuous-integration hudson jenkins tomcat6

您建议在Grails + Tomcat(+ Ubuntu)环境中持续集成哪种工具?詹金斯?哈德森?别的什么?我不是在寻找任何复杂的东西......简单就可以了。

2 个答案:

答案 0 :(得分:7)

我刚刚在Jenkins中配置了一个grails工作(在debian上运行)。我真的不能对其他CI服务器说些什么..我也知道apache连续体,但多年来都没有使用它。

对于Debian / Ubuntu,您只需添加

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

在/etc/apt/sources.list中,然后通过安装jenkins apt-get update&& apt-get install jenkins

创建了一个用户jenkins。

您可能想要更改默认配置 在/ etc /默认/詹金斯 使用另一个前缀(即将其设置为jenkins,因此url将类似于http://localhost:port/jenkins)port或JENKINS_HOME。

默认的jenkins home是/ var / lib / jenkins。

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

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

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

对于“发布Junit结果报告”,请使用YOUR_PROJECT / target / test-reports / TESTS-TestSuites.xml等路径

另外不要忘记为Jenkins安装“Chuck Norris插件”......它是有史以来最重要的插件!

如果您还想在apache站点配置中使用apache2 + Jenkins包含类似内容:

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

答案 1 :(得分:-4)

Bamboo是最好的。我和大多数CI合作过。