CI/CD TestNG job fails when retries are done in the suite, need it to pass when the retry is successful

Problem: When the suite has retries(Implemented a retry listener) but no failures, at the completion of the CI/CD job it shows the following.
ERROR: Job failed: command terminated with exit code 1

This error code will flag the Job run as failed with a FAILED status.

I want to be able to say that the Job passed since all the tests completed albeit retries happened.

Locally through Intellij IDEA the same suite execution shows: “Process finished with exit code 0”

Question: Is there anything I can do to modify the result to reflect passed when there are retries but no failures?