2

I've heard about the Naginator plugin, but unfortunately it's only for freestyle job type.

Is there any solution for pipeline jobs to be triggered if they failed? I thought about creating a command in the syntax or maybe triggering a freestyle job on the pipeline.

Peter Turner
  • 1,430
  • 4
  • 17
  • 35
Lev Meshorer
  • 21
  • 1
  • 2

1 Answers1

1

The simplest way to do this would probably be to add a retry option to the pipeline.

See https://www.jenkins.io/doc/book/pipeline/syntax/#options

Bruce Becker
  • 3,573
  • 4
  • 19
  • 40
  • As @Bruce Becker mentioned, you can use retry steps in your jenkinsfile. optionally you can set how many time the stage tries attempting or set timeout See, https://www.jenkins.io/doc/pipeline/tour/running-multiple-steps/#timeouts-retries-and-more – Chachatonel Sep 12 '21 at 13:26