1

I am managing deployment / CI of a Flask app through Jenkins. I have a build step in the form of an executed shell which runs a shell script in the host that in turns runs nosetests.

The Jenkins shell command looks like so:

$WORKSPACE/ops/test_integration.sh

integration.sh looks like so:

SETTINGS_FILE="settings/integration.py" nosetests $@

How do I have the jenkins job fail and discontinue the build if the nosetests in the above shell script fail? Thanks.

i_trope
  • 1,554
  • 2
  • 22
  • 42

1 Answers1

2

I suspect nosetests will return a non zero value on failure

so you can set the shell to auto fail with

set -e

or any of the other options in here

Community
  • 1
  • 1
KeepCalmAndCarryOn
  • 8,817
  • 2
  • 32
  • 47