I have a built a Mule API with Munits. I would like to build and deploy the application using jenkins pipeline. However, before build & deploy, I would like to execute maven clean test and check if code coverage is less than some x%. if yes, then I would like to fail the build/deployment to Mule cloud hub.
Is there a Jenkins plugin or any option to fail the jenkins pipeline when the code coverage is less than pre-defined threshold (let's say 80%)?
Thanks, Bala