jenkins – 节点JS + GitHub集成在Windows 10生成过程中失败

我正在尝试使用Jenkins版本1.6来configuration节点js的继续集成

步骤1:通过保持全局configuration,我已经configuration了如下的NodeJS安装

全局配置

第2步:我的作业configurationselect节点全局configuration在这里

作业配置

第三步:我的作业控制台,它正在获取适当的git回购安装npm它失败 作业控制台

> C:\Git\Git\bin\git.exe config core.sparsecheckout # timeout=10 > C:\Git\Git\bin\git.exe checkout -f f1612bda9378e7f03738d142a5ce7c0d0a55f6c3 > C:\Git\Git\bin\git.exe rev-list f1612bda9378e7f03738d142a5ce7c0d0a55f6c3 # timeout=10 Unpacking https://nodejs.org/dist/v6.9.0/node-v6.9.0-win-x86.zip to C:\Users\Selva\.jenkins\tools\jenkins.plugins.nodejs.tools.NodeJSInstallation\node_v6.9 on Jenkins [substack] $ C:\Users\Selva\.jenkins\tools\jenkins.plugins.nodejs.tools.NodeJSInstallation\node_v6.9\node.exe C:\Users\Selva\AppData\Local\Temp\hudson640278178448032292.js C:\Users\Selva\AppData\Local\Temp\hudson640278178448032292.js:1 (function (exports, require, module, __filename, __dirname) { npm install ^^^^^^^ SyntaxError: Unexpected identifier at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3 Build step 'Execute NodeJS script' marked build as failure Finished: FAILURE enter code here 

如果有哪一步我需要改变的任何错误,即时通讯使用jenkins稳定版本的Windows 10机器

在这里,我遵循官方jenkins维基页面的文档。 节点JS插件

有没有人请帮忙解决这个节点的JS + Github +jenkinsconfiguration

在步骤2中,不应该将npm install作为执行NodeJS脚本types的一个步骤运行。

  • 这期望您input有效的Node 脚本作为脚本 ,例如console.log('I should be valid javascript code')

Provide节点和npm bin /文件夹保留为PATH标记,并使用Windows PowerShell脚本replace执行NodeJS脚本步骤,在脚本中inputnpm install作为脚本值。