【发布时间】:2015-04-09 02:45:40
【问题描述】:
我想在我的 Windows7 上在 Jenkins 中运行 gulp 测试。当我在我的 cmd 中运行它时,测试成功。所以我使用命令:
gulp test
但是当我在 Jenkins 的 windows 批处理命令中添加 gulp 测试时,无法识别 gulp 命令。我试图为它创建一个环境变量。但它仍然失败。我有一个带有此输入的 prop.properties 文件。
gulp=node node_modules\gulp\bin\gulp.js
比我使用的:在构建过程中注入环境变量。我在我的 Jenkins 中定义了属性文件路径。当我构建作业时,我收到以下消息:
[EnvInject] - Injecting as environment variables the properties file path 'C:/path/propfile.properties'
[EnvInject] - Variables injected successfully.
但我在 Jenkins 中的 Windows 批处理命令无法识别该变量。
gulp is not recognized as internal or external command
谁能给我解释一个方法,这样我就可以在我的 Windows 一批 Jenkins 中使用 gulp test 命令,而不是 node_modules\gulp\bin\gulp.js 测试?
【问题讨论】:
-
您在上周有 4 个问题都在问同样的问题:stackoverflow.com/questions/29406533/gulp-wont-work-in-jenkins、stackoverflow.com/questions/29408115/…、stackoverflow.com/questions/29425571/…,还有这个。你不接受答案,如果答案对你有帮助,也不要提供反馈,只是一遍又一遍地问同样的问题。坚持一个问题,必要时修改它。不要垃圾邮件。
标签: jenkins environment-variables gulp