我有一个使用gulp构建的项目,我正在设置GitLab管道以实现持续集成。
我进行了一些更改,以使该作业有意失败,该命令失败了,但是该作业以“成功”结束。
这是输出:
sh: 1: gulp: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! Project@2.1.0 build-only: `gulp build-only`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the Project@2.1.0 build-only script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-10-28T21_44_15_322Z-debug.log
Successfully built project!!
----->======================================================================
Saving cache
Not uploading cache path/to/cache due to policy
Cleaning up file based variables
Job succeeded
该命令返回1,但作业仍将其视为成功。
在这种情况下如何设置作业失败?