How can I deploy the latest image version in case of an error in Jenkins Pipeline operation? How to prepare the Jenkinsfile for this situation?

How can I deploy the latest image version in case of an error in Jenkins Pipeline operation? How to prepare the Jenkinsfile for this situation?

Hi
Not sure what you want. but you could try always step with declerative pipeline or try catch block with scripted pipeline