I've setup Jenkins v1.550 on Windows Server 2008 R2. It runs as a service at http://localhost:8080
for now. I'm logged into the machine as an Administrator. I've installed Node.js and can run "npm" from the command line.
I've also installed the NodeJS plugin v0.2.1 for Jenkins. I then went into the Configure System section of Jenkins, scrolled down to NodeJS installations, clicked on Add NodeJS button, gave "NodeJS" as the name, and "C:Program Files
odejs" as the path to the installation directory. I didn't check the "Install automatically" option as I read on the plugin page that it is only available to Linux.
I then created a new job, clicked the checkbox that said "Provide Node & npm bin/ folder to PATH", created a new build step for "Execute Windows batch command" and typed in "node --version" and "grunt --version" and saved it.
I ran the job and this is the output -
Building in workspace C:Program Files (x86)JenkinsworkspaceTest_1.0
[Test_1.0] $ cmd /c call C:WindowsTEMPhudson1381541243088903083.bat
C:Program Files (x86)JenkinsworkspaceTest_1.0>node --version
v0.10.24
C:Program Files (x86)JenkinsworkspaceTest_1.0>grunt --version
'grunt' is not recognized as an internal or external command,
operable program or batch file.
C:Program Files (x86)JenkinsworkspaceTest_1.0>exit 9009
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
It looks like it's unable to find the grunt-cli for the user account Jenkins is running under (System). I tried to installing grunt cli globally (npm install -g grunt-cli
) and also grunt locally (npm install grunt
). No luck.
Can someone please help?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…