Failed Pipeline job should retry after each 5 minutes delay for max 3 times

Sample example:
pipeline {
agent any
stages {
stage(‘build’) {
steps {
eh “Hello World!”
}
}
}
}

This pipeline job will throw error as I typed “eh” instead of “echo”, what I want is, it should retry the build if it fails with 5 mins delay max 3 times. I want to make use of the similar concept in some pipeline code. Can someone please help on this?

Hi @Aaqib

Please see this following discussion. It may do some of what you require and help you an your way.