Jenkins使用系统Ruby-使用RVM红宝石吗? [英] Jenkins using System Ruby - use rvm ruby?

查看:177
本文介绍了Jenkins使用系统Ruby-使用RVM红宝石吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Jenkins正在为我们运行一个Ant构建. Ant构建了一个Objective-C项目的CI-一个可在iOS和OSX上使用的库.

Jenkins is kindly running an Ant build for us. The Ant build orchestrates CI for an Objective-C project - a library that is available on both iOS and OSX.

此Ant构建可以在Jenkins中运行,也可以在Jenkins中运行,因此开发人员可以在签入之前验证其工作,并且Jenkins将提供另一层检查. (因此减少了构建失败影响其他贡献者的机会).

This Ant build can be run both in or out of Jenkins, so devs can verify their work before checking in, and Jenkins will provide another layer of checks. (Therefore reducing the chance of a broken build impacting other contributors).

我创建了一个执行以下任务的任务:

I've created a task that does the following:

<target name="--podspec.lint">
    <exec executable="pod" failifexecutionfails="yes" failonerror="yes">
        <arg line="spec lint ProjectName.podspec"/>
    </exec>
</target>

. .即使机器已安装RVM,Jenkins似乎仍在使用System Ruby.有没有办法告诉詹金斯使用rvm版本?这似乎是一个路径问题-尽管RVM在.profile中具有优先权,但系统bin dirs已将路径的前面移了.

. . it seems that Jenkins is using the System Ruby, even though the machine has RVM installed. Is there a way to tell Jenkins to use the rvm version? This seems like a path problem - the sytem bin dirs have moved the the front of the path, even though RVM takes precedence in the .profile.

推荐答案

教程应该包含了您所需要的一切需要.它是为Ubuntu编写的,但是如果操作系统不同,您应该能够做类似的事情.

This tutorial should have everything you need. It is written for Ubuntu, but you should be able to do something analogous for your OS if it differs.

主要目的是,您需要配置 jenkins 用户,然后为该 jenkins 用户设置rvm.

The main thrust is that you need to configure a jenkins user and then setup rvm for that jenkins user.

这篇关于Jenkins使用系统Ruby-使用RVM红宝石吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆