简体   繁体   中英

gulp command not recognized in Jenkins

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.

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

Manage Jenkins-->Configure System-->Global Properties: 在此输入图像描述

如果您已将gulp定义为项目的依赖项,那么您也可以直接使用它:

node_modules\\.bin\\gulp mytask

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM