The jenkins script is pretty simple. The build fails when a script fails, that is, has non zero exit code.
Also, if you are using the junit plugin to publish your results, make sure the plugin is not failing your build when it finds a failed test in the results.
However, try to find the reason why test fail. Always get the application log for your test runs and check what happens there. If an automated test is not reliable, use manual testing.
Also, you can use cucumber hooks to take a screenshot whenever a test fails. That's a big help when you are trying to understand failed tests.