Bra*_*som 5 jenkins cloudbees gruntjs
我正在尝试让Jenkins在Cloudbees上构建并运行.我已经成功安装了NodeJs并从我的BitBucket存储库中取出了我的源代码.我试图在部署之前运行我的grunt任务来缩小和连接我的JS和CSS文件.但是,即使已成功安装,我也无法运行grunt程序.以下是我的构建脚本:
curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
NODE_VERSION=0.8.0 \
source ./use-node
npm install
npm install grunt
grunt
Run Code Online (Sandbox Code Playgroud)
我尝试使用和不使用-g选项安装grunt但没有成功.这是我构建的grunt部分的控制台输出:
+ npm install grunt
...
npm http GET https://registry.npmjs.org/grunt
npm http 200 https://registry.npmjs.org/grunt
...
grunt@0.4.0 node_modules/grunt
??? dateformat@1.0.2-1.2.3
??? colors@0.6.0-1
??? hooker@0.2.3
??? eventemitter2@0.4.11
??? which@1.0.5
??? iconv-lite@0.2.7
??? coffee-script@1.3.3
??? lodash@0.9.2
??? nopt@1.0.10 (abbrev@1.0.4)
??? rimraf@2.0.3 (graceful-fs@1.1.14)
??? minimatch@0.2.11 (sigmund@1.0.0, lru-cache@2.2.2)
??? glob@3.1.21 (graceful-fs@1.2.0, inherits@1.0.0)
??? findup-sync@0.1.2 (lodash@1.0.1)
??? js-yaml@1.0.3 (argparse@0.1.12)
+ grunt
/tmp/hudson3382014549646667419.sh: line 8: grunt: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Run Code Online (Sandbox Code Playgroud)
关于如何使这个工作的任何想法?这在Cloudbees中甚至可能吗?
Grunt现在被烦恼地分解成一个单独的cli模块.另外,令人讨厌的是,cli模块本身不包含grunt.
为了使这项工作:
curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
NODE_VERSION=0.8.0 \
source ./use-node
npm install
npm install grunt
npm install grunt-cli
export PATH=$PATH:node_modules/grunt-cli/bin/
grunt
Run Code Online (Sandbox Code Playgroud)
如果民众改变它的工作方式是合理的,那么它将来可能会发生变化.
文档:http://gruntjs.com/getting-started
| 归档时间: |
|
| 查看次数: |
3511 次 |
| 最近记录: |