yaml - 当eslint记录错误时如何使我的bitbucket管道失败
问题描述
我正在用 yml 中的 bitbucket 编写我的第一个管道,并且想知道当 eslint 测试结果出现一些错误并且仅在 eslint 测试没有错误日志时才通过时如何使我的管道失败。这是我的管道到目前为止的样子:
image: node:14.15.1
definitions:
caches:
yarn: ~/.yarn
pipelines:
branches:
dev:
- step:
name: Package Install
caches:
- yarn
script:
- cd web_app
- yarn install
- step:
name: lint
caches:
- yarn
script:
- cd web_app
- yarn install
- yarn run lint
- step:
name: build
caches:
- yarn
script:
- cd web_app
- yarn install
- unset CI
- yarn build
将不胜感激任何帮助!