I am trying to build Jenkins and work on Cloudbees. I successfully received NodeJs and my source was extracted from my BitBucket repository. I am trying to run my grunt task to minimize and merge my JS and CSS files before deployment. However, I cannot run the grunt program, even if it is successfully installed. Below is my build script:
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
I tried installing grunt with the -g option and without it without success. Here is the console output for the rough part of my assembly:
+ 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
Any ideas on how to make this work? Is this possible in Cloudbees?
source
share