The Replay button has caused mass confusion in my company.
We've gone through a couple of iterations of jenkinsfiles. The first iteration had many load commands, and upon replay the pipeline would never run properly
On our current iteration we are generating jenkinsfiles on every run, and then loading a (possibly different) declarative pipeline into jenkins.
In the simplest terms, something like:
node('label') {
checkout scm
sh("./gradlew generate")
load("generated/Jenkinsfile")
}
This is problematic because when replay is kicked, load uses the script from the previous run, but it might be different due to state stored in external systems (namely artifact repositories)
From the blue ocean UI users click the little button that looks like rebuild, but it replays and doesn't do what our users expect. At this point we are sending out warnings to our users to never click replay, and never click the rerun button from blue ocean. We are directing users to go back to te classic view and Rebuild or Build with Parameters. However, that isn't a real solution. What we really need is an ability to 1). disable replay and 2). instruct blue ocean to user "Rebuild" instead of "Replay".
jimklimov is this for Pipeline jobs or other kinds of jobs? A Jenkinsfile example would help here if its a Pipeline job.