I'm trying to automate building of my project on a TeamCity server. I'm using grunt
to define and configure my tasks. This works fine locally. Yet, I am having problems getting TeamCity (running on Windows Server 2008) to recognize grunt
as a executable, the build will fail when grunt
is called as it is not available.
I do have grunt-cli
installed on the server and can execute it when I login via ssh (The build script also succeeds when I trigger it that way).
I'm running npm install
before I call grunt and also tried to force install grunt-cli
using a preinstall
instruction in my package.json
like:
{
"name": "someName",
"version": "0.0.1",
"private": true,
"scripts" : {
"preinstall" : "npm install grunt-cli -g"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.6.3",
"grunt-contrib-less": "~0.8.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-strip": "~0.2.1",
"grunt-bump": "0.0.11"
}
}
I can see npm installing grunt-cli, yet grunt is not available in the next step.
I also tried wrapping that into a bat
file or using multiple build steps for dependency installing and running the grunt task.
Does anyone have any input on this?