无法运行 Jenkins Build - 捆绑包:“找不到命令" [英] Can't run Jenkins Build - bundle: "command not found"

查看:19
本文介绍了无法运行 Jenkins Build - 捆绑包:“找不到命令"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试为我的一些黄瓜任务运行 jenkins 构建.我所有的 gem 都是使用 Bundler 安装的.gem 存储在 vendor 文件夹中.

I am currently trying to run a jenkins build for some of my cucumber tasks. All of my gems have been installed by using the Bundler. The gems are stored in the vendor folder.

但是,当我尝试在执行 shell 构建步骤中运行 bundle install --deployment 时,我收到以下错误:

However, when I try and run bundle install --deployment in the execute shell build step, I get the following error:

Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/jobs/cukes/workspace
[workspace] $ /bin/sh -xe/var/folders/zz/zyxvpxvq6csfxvn_n0000004000001/T/hudson4461284045505361460.sh
+ bundle install --deployment
/var/folders/zz/zyxvpxvq6csfxvn_n0000004000001/T/hudson4461284045505361460.sh: line 2: bundle: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE

这快把我逼疯了!它在我的本地机器上运行没有问题.为什么 Jenkins 看不到我的宝石?

This is driving me crazy! It runs on my local machine with no problems. Why can't Jenkins see my gems?

任何帮助都会很棒!

干杯,乔恩

推荐答案

就我而言,我将这一行添加到脚本的第一行:

In my case, I added this line to the first of script:

#!/bin/bash -l

这篇关于无法运行 Jenkins Build - 捆绑包:“找不到命令"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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