I am running a psql script with 4 queries in it in jenkins, and the script failed because of a small typo but the build was marked as successful:
TRUNCATE TABLE
INSERT 0 3331
INSERT 0 133
INSERT 0 151
psql:/home/BI/payments/paypal_payments.sql:196: ERROR: table name "pe" specified more than once
Finished: SUCCESS
Anyone know how to make the build be marked correctly as failed?
EDIT
Apparently Jenkins marks all builds as successful if the last command was... See this answer
Does anyone know how to log or output an error from postgres at the end of the build so that jenkins understands this?