![OpenShift 在 Build 上出现“由于提交后挂钩,构建失败。”](https://linux22.com/image/1589407/OpenShift%20%E5%9C%A8%20Build%20%E4%B8%8A%E5%87%BA%E7%8E%B0%E2%80%9C%E7%94%B1%E4%BA%8E%E6%8F%90%E4%BA%A4%E5%90%8E%E6%8C%82%E9%92%A9%EF%BC%8C%E6%9E%84%E5%BB%BA%E5%A4%B1%E8%B4%A5%E3%80%82%E2%80%9D.png)
我一直在尝试使用 OpenShift 构建和部署 MEAN 堆栈应用程序。我在创建项目时应用了 Node.js 和 MongoDB 模板。我似乎找不到任何资源来帮助我,并试图理解本文档还尝试了为现有项目配置提交后挂钩的方法。OC shell 表示我已成功“更新”提交后挂钩。但我仍然收到此错误。此外,构建需要 49 分钟,但在安装依赖项后才会失败。
Cloning "CONFIDENTIAL" ...
Commit: CONFIDENTIAL
Author: CONFIDENTIAL>
Date: CONFIDENTIAL
---> Installing application source ...
---> Installing all dependencies
npm WARN notice [SECURITY] base64url has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=base64url&version=2.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] hoek has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=hoek&version=2.16.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] lodash has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=4.17.5 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] mpath has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=mpath&version=0.3.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN [email protected] No repository field.
added 106 packages in 2928.818s
---> Building in production mode
---> Pruning the development dependencies
npm WARN [email protected] No repository field.
up to date in 0.679s
/opt/app-root/src/.npm is not a mountpoint
---> Cleaning the npm cache /opt/app-root/src/.npm
/tmp is not a mountpoint
---> Cleaning the /tmp/npm-*
Running post commit hook ...
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
> [email protected] test /opt/app-root/src
> echo "Error: no test specified" && exit 1
Error: no test specified
npm ERR! Test failed. See above for more details.
error: build error: container "CONFIDENTIAL" returned non-zero exit code: 1