the problem that build is succeeded
- I’ve tried
test:
pre:
- set -eo pipefail && npm run lint
-
and tried luck with
npm run lint || exit 1
# Manually Failing a Deployment - #2 by alexey -
and
process.exit(1);
since my codebase in js -
and moved script to
dependencies: post
as proposed here https://discuss.circleci.com/t/fail-fast-stop-running-tests-on-first-failure/1356/8?u=andreishostik -
and finally wrote a script as described here Build not failing even test exit with code 1
dependencies:
post:
- |
set -e
exitcode=$?
npm run lint
if [ "$exitcode" != "0" ]; then exit 1; fi
in spec - https://circleci.com/docs/1.0/manually/#overview - you can find an info about exit codes:
Failing commands (those with a non-zero exit code) will cause the whole build to fail, and you’ll receive a notification
but it’s not like it was described, unfortunately I cannot provide a link to a build as the project is private only an screenshot:
as you can see a lint task returns exit 1
but build doesn’t fail. from another side I’ve tried return exit code 1 directly, and finally it works:
but not in script wtf
…it drives me nuts