Node.js Jenkins-NodeJS+;GitHub在windows 10上的集成在生成过程中失败
我正在尝试使用Jenkins 1.6版为node js配置持续集成 步骤1: 通过保持全局配置,我已按如下方式配置了NodeJS安装 步骤2:我的作业配置选择节点全局配置此处 第3步:我的作业控制台,安装npm失败时获取正确的git回购 如果在哪一步上有任何错误,我需要更改,我将使用windows 10机器和jenkins稳定版 在这里,我遵循了jenkins官方维基页面的文档。Node.js Jenkins-NodeJS+;GitHub在windows 10上的集成在生成过程中失败,node.js,github,jenkins,continuous-integration,jenkins-plugins,Node.js,Github,Jenkins,Continuous Integration,Jenkins Plugins,我正在尝试使用Jenkins 1.6版为node js配置持续集成 步骤1: 通过保持全局配置,我已按如下方式配置了NodeJS安装 步骤2:我的作业配置选择节点全局配置此处 第3步:我的作业控制台,安装npm失败时获取正确的git回购 如果在哪一步上有任何错误,我需要更改,我将使用windows 10机器和jenkins稳定版 在这里,我遵循了jenkins官方维基页面的文档。 在第2步中,是否有人帮助解析此节点JS+Github+Jenkins config,您不应该以Execute
在第2步中,是否有人帮助解析此节点JS+Github+Jenkins config,您不应该以Execute NodeJS script类型的步骤运行
npm install
- 这要求您输入有效的节点Javascript作为脚本,例如
console.log(“我应该是有效的Javascript代码”)
将提供节点和npm bin/文件夹的路径标记为并将执行节点脚本的步骤替换为Windows PowerShell脚本,在该脚本中输入
npm install
作为脚本的值。解决方案请注意,但在阅读答案之前,我还是不明白问题出在哪里。谢谢Linux系统也发生了同样的事情,我快发疯了。我能感觉到你的痛苦,我自己也浪费了几个小时!我正在尝试执行shell命令,但它不起作用/usr/local/bin/npm install
您的评论帮助了我。非常感谢,@Daniel J.G。
> 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