gulp command not recognized in Jenkins

狂风中的少年 提交于 2019-12-11 02:15:51

问题


I've installed gulp and it works well in my cmd. So when I'm trying the gulp commands they work well. So I'm going to this path in my cmd:

C:\Program Files (x86)\Jenkins\workspace\project1

And I can run gulp (its a github project on my Jenkins). But when I'm working on my project1 in Jenkins itself (localhost), the gulp commands aren't recognized. Jenkins doesn't know gulp.

How do I have to integrate gulp in Jenkins? So my Jenkins will know its commands. I read something about node.js and its pluging. I also read something about a frontend-maven-plugin/ but it isn't clear at all.


回答1:


You need to add the gulp path for Jenkins so it knows where the command resides.

Manage Jenkins-->Configure System-->Global Properties:




回答2:


If you have gulp defined as your project's dependency then you can also use it directly:

node_modules\.bin\gulp mytask



来源:https://stackoverflow.com/questions/29408115/gulp-command-not-recognized-in-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!