I have protractor installed on windows slave machine. I am trying to run my script using node index.js
.
If I trigger job from jenkins to run above command it gives error like Protractor is not recognized as an internal or external command, operable program or batch file.
. But when I run command directly on slave machine it execute it successfully.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use the Jenkins NodeJS plugin(https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin) to install node and additional npm packages like protractor, grunt, etc.
After installing npm packages at global level, you can select the "Provide Node & npm bin/folder to PATH" checkbox to ensure you can run "protractor", "grunt" into shell or batch command.
Hope this helps.