How to retry a Jenkins Pipeline stage with an agent condition

@borik11 This question was asked last year, but I would like to know if you were able to make it work?