Reputation: 4220
I have grunt running this just fine locally, however after setting up my Jenkins server to do the same thing I'm running into a problem with grunt being unable to find the grunt file. Could I have missed installing/configuring something? I can't tell what's wrong from the error output, here is what i'm getting on the jenkins box:
[user@buildserver]# ls
AUTHORS CHANGELOG coverage Gruntfile.js package.json README.md reports spec src
[user@buildserver]# grunt
grunt-cli: The grunt command line interface. (v0.1.6)
Fatal error: Unable to find local grunt.
If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
Here's the Gruntfile.js
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
jasmine : {
src : 'src/**/*.js',
options : {
specs : 'spec/**/*.js',
template : require('grunt-template-jasmine-istanbul'),
templateOptions: {
coverage: 'reports/coverage.json',
report: 'reports/coverage'
}
}
},
});
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.registerTask('default', ['jasmine']);
};
Upvotes: 12
Views: 18884
Reputation: 3034
you can setup everything from jenkins admin interface, you don't need to install grunt locally :)
and hopefully git/nodejs and grunt will be available to you
see the plugin wiki for more details how to add the grunt/node tasks to the jenkins job -> https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin
it's really easy :)
no ssh loggin required just jenkins admin rights
Upvotes: 2
Reputation: 14255
Have you installed grunt in your Jenkins server?
npm install grunt
Upvotes: 18