在 RAILS 3 中设置巡航控制时出现问题
我只是在我的项目服务器上设置巡航控制。 但现在我有点困惑这些 rake 任务和 capistrano 是如何工作的。 我尝试了很多设置但仍然没有成功。如果有人帮助如何运行所有 rake 任务以及成功构建后我如何部署我的应用程序。
I just setup cruise control on my server for my projects .
But now i am little bit confused how these rake task and capistrano work .
I tried lots of settings but still no success . If somebody help how to run all rake task and after successful build how can i deploy my application .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
CruiseControl 不应该部署您的应用程序。
当您想要部署您的应用程序时(在对源代码控制的许多提交进行多次成功的 Cruisecontrol 测试之后,您将:
cap deploy
CruiseControl isn't supposed to deploy your app.
When you want to deploy your app (after many successful cruisecontrol tests against many commits to source control, you'll then:
cap deploy
好的,谢谢大家,在查看代码后我发现我们可以部署 -:
1.您可以使用 ccrb_cap_deployer.rb 插件来执行此操作,但它有点错误,所以我在路径中做了一些更改并将代码推送到 git 中现在
我们必须在项目配置文件 /.cruise/projects/your_project/cruise_config.rb 中添加这两行
,而且这个插件只允许将代码部署到各自的服务器中当构建成功时。干杯
2.第二种方法是创建一个名为 build_script.sh 的 shell 脚本到此路径 /.cruise/projects/your_project/work/
之后,将
行添加到build_script.sh 并保存,然后在项目配置文件中添加 project.build_command = './build_script.sh' /.cruise/projects/your_project/cruise_config.rb
现在一切都完成并且工作正常,但在第二种方法中,问题是如果构建也失败,那么您的代码也会部署到服务器。所以我认为这是一个不好的方法。
谢谢大家的帮助。
Ok guys thanks after looking into code i find out that we can deploy -:
1.Either you can use ccrb_cap_deployer.rb plugin to do so , but it is little bit buggy so i made some changes in the path and pushed the code into git again here
Now we had to add these two lines inside the project configuration file /.cruise/projects/your_project/cruise_config.rb
Also this plugin only let deploy the code into respective servers when the build is successful . Cheers
2.Second way is to create one shell script named it as build_script.sh to this path /.cruise/projects/your_project/work/
After that add
lines into the build_script.sh and save , Then add project.build_command = './build_script.sh' inside the project configuration file /.cruise/projects/your_project/cruise_config.rb
Now everthing done and works fine but in second method the problem is that if the build fails as well then also your code is deployed to server . SO i think that is a bad approach .
Thanks for help everyone.