I am using declarative pipeline syntax. I want to re trigger my build for 3 times if it fails. I want to add this step in my pipeline may be in post step: Something like below:
post {
failure{
retrigger //try for 3 times atleast
}
}