skip to content
blog.metters.dev

TIL about Jenkins Replay Feature

/ 1 min read


NOTE: This feature requires admin rights for a valid reason: Replays execute without being documented in version control, and this includes potentially harmful code!


When working on a Jenkins Pipeline, continuously committing and pushing changes just to test them can feel laborious. However, there is another, more transient method of testing code changes: Replay.

Not only does Replay offer a quicker solution to testing changes compared to conventional methods, but it also allows for several runs to be triggered simultaneously.

It’s interesting to note that this feature does not have a counterpart on GitHub. Sure, GitHub lets you ‘Re-run a build’, but it does not allow modifications to the script in the process. From a security perspective, this is not only intentional but is actually considered a feature.

How to replay a pipeline run

  1. Find the build you want to replay, then click on “Replay” in the left-hand navigation bar.
  2. Now you can make changes to the script or scripts for the replay.
  3. Click ‘run’.

Resources