How to configure different versions of Ruby / any other software in self hosted agent?

天涯浪子 提交于 2020-08-10 23:50:23

问题


I have installed 3 different versions of Ruby in self hosted agent but i am unable to use them in my vsts task as required. The microsoft document suggests configuring "Agent.ToolsDirectory" but i am not sure how to configure it in the self hosted agents. Can anyone help me with descriptive steps on how to configure it so that i can use the vsts task : "Use Ruby Version task" on my self hosted agent


回答1:


how to configure it in the self hosted agents?

Agent.ToolsDirectory, this is one of capabilities of pool which need you add it in the Org setting. So that while the pipeline executed, it will depend on it.

So, for configure it, just go Org setting-->Agent pools. Click the agent pool where your self host agent is which you have installed 3 different version ruby.

And then point to the agent, and open the capabilities tab and Click Add capability.

Input Agent.ToolsDirectory in the left blank, and add the file path where your ruby installed. For me, I installed it in the file _work_tool of my agent.

After these configured, you can use Use Ruby Version task to point out which version Ruby you want to use with self hosted.



来源:https://stackoverflow.com/questions/56751152/how-to-configure-different-versions-of-ruby-any-other-software-in-self-hosted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!