如何使用TeamCity在所有代理上安装Ruby gem?

时间:2022-09-28 07:15:50

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?

我正在使用Teamcity 6.5.6,并寻找一种在构建代理上自动安装所需的ruby GEMS的方法。对于Ex:假设我在每个代理/远程(构建)机器上都需要两个宝石。例如:Watir和Selenium宝石。那么我想通过登录这些机器来手动安装它们,或者我可以将它们保存在SVN中的公共库文件夹中,并在Teamcity中执行某些任务以在机器上不存在时安装它们。如果是这样,那么Teamcity中的任务是什么?

Thanks

谢谢

1 个解决方案

#1


5  

Take a look at Bundler.

看看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).

您可以在Gemfile中维护所需宝石的列表,然后在构建开始之前在每台机器上运行bundle install。这将安装Gemfile中的所有gem(你可以通过包括Gemfile.lock文件将gems锁定到特定版本)。

#1


5  

Take a look at Bundler.

看看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).

您可以在Gemfile中维护所需宝石的列表,然后在构建开始之前在每台机器上运行bundle install。这将安装Gemfile中的所有gem(你可以通过包括Gemfile.lock文件将gems锁定到特定版本)。