I have the below snippet in my chef recipe.
begin
execute 'run_tests' do
command comand_string_to_run_nUnint
user "user"
password passkey
end
ensure
execute 'upload_report' do
command uplaod
user "user"
password passkey
end
end
the problem is that the report is being uploaded successfully in case of all test passed, but fails to upload when there is a failure in any of the test case.
how do I ensure the report is uploaded in all cases.
is there a different way to handle exceptions?
ps: I am uploading to artifact repository named Nexus.