mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-06 09:21:07 +03:00
gitlab-ci: show clear error message when one step of job fails
This commit is contained in:
parent
169d551683
commit
052e22284b
1 changed files with 7 additions and 6 deletions
|
@ -142,14 +142,15 @@ lint_format_safety_bandit_checks:
|
||||||
- python3 -m ensurepip
|
- python3 -m ensurepip
|
||||||
- $pip install Babel 'bandit<1.6.0' pycodestyle pyflakes 'pylint<2.0' safety
|
- $pip install Babel 'bandit<1.6.0' pycodestyle pyflakes 'pylint<2.0' safety
|
||||||
- export EXITVALUE=0
|
- export EXITVALUE=0
|
||||||
- ./hooks/pre-commit || export EXITVALUE=1
|
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
|
||||||
- ./tests/test-gradlew-fdroid || export EXITVALUE=1
|
- ./hooks/pre-commit || set_error
|
||||||
|
- ./tests/test-gradlew-fdroid || set_error
|
||||||
- bandit
|
- bandit
|
||||||
-ii
|
-ii
|
||||||
-s B110,B322,B404,B408,B410,B603,B607
|
-s B110,B322,B404,B408,B410,B603,B607
|
||||||
-r $CI_PROJECT_DIR fdroid
|
-r $CI_PROJECT_DIR fdroid
|
||||||
|| export EXITVALUE=1
|
|| set_error
|
||||||
- safety check --full-report || export EXITVALUE=1
|
- safety check --full-report || set_error
|
||||||
- pylint --rcfile=.pylint-rcfile --output-format=colorized --reports=n
|
- pylint --rcfile=.pylint-rcfile --output-format=colorized --reports=n
|
||||||
fdroid
|
fdroid
|
||||||
makebuildserver
|
makebuildserver
|
||||||
|
@ -157,9 +158,9 @@ lint_format_safety_bandit_checks:
|
||||||
fdroidserver/*.py
|
fdroidserver/*.py
|
||||||
tests/*.py
|
tests/*.py
|
||||||
tests/*.TestCase
|
tests/*.TestCase
|
||||||
|| export EXITVALUE=1
|
|| set_error
|
||||||
- apk add --no-cache gettext make
|
- apk add --no-cache gettext make
|
||||||
- make -C locale compile || export EXITVALUE=1
|
- make -C locale compile || set_error
|
||||||
- rm -f locale/*/*/*.mo
|
- rm -f locale/*/*/*.mo
|
||||||
- pybabel compile --domain=fdroidserver --directory locale 2>&1 | (grep -F "error:" && exit 1) || true
|
- pybabel compile --domain=fdroidserver --directory locale 2>&1 | (grep -F "error:" && exit 1) || true
|
||||||
- exit $EXITVALUE
|
- exit $EXITVALUE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue