如何使用 TeamCity 在所有代理上安装 Ruby gems?
我正在开发 Teamcity 6.5.6,并寻找一种在构建代理上自动安装所需的 ruby GEMS 的方法。 例如:假设我有每个代理/远程(构建)机器上需要的两个 gem。例如:瓦提尔和硒宝石。那么我是否应该通过登录到这些计算机来手动安装它们,或者我可以将它们保存在 SVN 中的公共库文件夹中,并在 Teamcity 中执行一些任务来安装它们(如果计算机上不存在它们)。 如果是这样,那么 Teamcity 中的任务是什么?
谢谢
I am working on Teamcity 6.5.6, and looking for a way to automatically install required ruby GEMS on build agents.
For Ex: Suppose I have two gems that are required on each agent/remote (build) machine. Ex: Watir and Selenium gems. Then am I suppose to install them manually by logging on to those machines, or can I do keep them in a common library folder in SVN, and perform some tasks in Teamcity to install them if not present on machine.
If so, then What would be that task in Teamcity?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 Bundler。
您可以在 Gemfile 中维护所需 gem 的列表,然后在构建开始之前在每台计算机上运行
bundle install
。这将安装 Gemfile 中的所有 gem(您还可以通过包含 Gemfile.lock 文件将 gem 锁定到特定版本)。Take a look at Bundler.
You could maintain a list of your required gems in a Gemfile, then run
bundle install
on each machine before the build starts. This would install all of the gems in the Gemfile (and you could lock gems to a particular version by also including the Gemfile.lock file).