e.g. I found some narrative docs like: https://www.jenkins.io/doc/pipeline/tour/running-multiple-steps/#timeouts-retries-and-more
They show there are two method