17

If you want to re-run a Jenkins job, you can click the Rebuild button which sometimes appears as the Replay button.

What is the difference Rebuilding a job versus Replaying it?

Why is it that some jobs display Replay while others display Rebuild?

Wimateeka
  • 368
  • 1
  • 2
  • 9

1 Answers1

20

Rebuild, using the Rebuilder plugin allows a completed job to be re-executed while allowing you to change the parameters, assuming your job is parameterized.

Replay does something similar, except it doesn't show you parameters. Instead, it shows the pipeline code directly. This is helpful when wanting to test changes iteratively as you can click Replay, change one or two lines of code, then let it execute. The job will run using the same parameters as it did the first time it ran/completed.

Argyle
  • 1,018
  • 2
  • 9
  • 20
  • This only answers half the question. Why is rebuild/retrigger not an option sometimes? – Michael May 04 '21 at 17:53
  • 4
    Replay won't appear if the code isn't loaded. If you abort the pipeline or have SCM authentication issues, and git can't load the code, you won't see the replay button. If you have jenkins code inline this won't be an issue. – Azteca Aug 02 '21 at 17:21