Rebuilds (perhaps with parameters) are AFAIK implemented by a separate plugin; the BlueOcean interface does not have a way to trigger such rebuilds - so I could repeat a build after fixing external circumstances that caused it to fail. I have to go into classic interface (oh, there is no link for that either, so I edit the text in the address bar) and click a Rebuild action there.

          [JENKINS-49348] BlueOcean misses a button to re-run a build

          James Dumay added a comment -

          jimklimov is this for Pipeline jobs or other kinds of jobs? A Jenkinsfile example would help here if its a Pipeline job.

          James Dumay added a comment - jimklimov is this for Pipeline jobs or other kinds of jobs? A Jenkinsfile example would help here if its a Pipeline job.

          Jim Klimov added a comment - - edited

          I've now attached a few screenshots

          • nonpipeline-noreplay.png - a freestyle job sports no "replay/rerun" button in the build results at all
          • nonpipeline-with-RunBtn.png - history of that freestyle job does have a big Run button, which yields a popup that this job has inputs not supported by BO but that I can continue into Classic Interface to fill out the Build arguments form - which I do happily
          • pipeline-native-with-replayBtn.png - this one for a job made "natively" via Jenkinsfile pipeline scripts (Organization => MultiBranch Pipeline => PR and branch jobs) has the curly-arrow button hinted as "Rerun", but actually does a pipeline replay according to the message (in particular, it does not ask for Build arguments)
          • pipeline-native-replayed.png - history of those native pipeline jobs, the completed ones also have a "Rerun" button with a no-questions-asked "Replay" action

          The "native" Jenkinsfile pipeline script in examples above is https://github.com/42ity/tntnet/blob/558f33b48569998fc82f3c38065c6141254b66fd/Jenkinsfile

          Jim Klimov added a comment - - edited I've now attached a few screenshots nonpipeline-noreplay.png - a freestyle job sports no "replay/rerun" button in the build results at all nonpipeline-with-RunBtn.png - history of that freestyle job does have a big Run button, which yields a popup that this job has inputs not supported by BO but that I can continue into Classic Interface to fill out the Build arguments form - which I do happily pipeline-native-with-replayBtn.png - this one for a job made "natively" via Jenkinsfile pipeline scripts (Organization => MultiBranch Pipeline => PR and branch jobs) has the curly-arrow button hinted as "Rerun", but actually does a pipeline replay according to the message (in particular, it does not ask for Build arguments) pipeline-native-replayed.png - history of those native pipeline jobs, the completed ones also have a "Rerun" button with a no-questions-asked "Replay" action The "native" Jenkinsfile pipeline script in examples above is https://github.com/42ity/tntnet/blob/558f33b48569998fc82f3c38065c6141254b66fd/Jenkinsfile

          (At least) for pipelines with parameters BlueOcean shows the "Run" button on pipeline activity view; this in turn will ask for values for these parameters:

          Reinhold Füreder added a comment - (At least) for pipelines with parameters BlueOcean shows the "Run" button on pipeline activity view; this in turn will ask for values for these parameters:

          Brian Saville added a comment -

          jamesdumay, this would be extremely helpful for us as well. We heavily use pipeline jobs, and modify them often through the Job DSL plugin. Since the re-run button currently does a replay, it will use the old pipeline script instead of the latest one. The rebuild plugin does some nice things as well such as maintain the same build parameters and causes. Causes are especially important to us because it can trigger different behavior based on what caused the build in the first place.

          IMHO, I think we should either have two buttons available in blue ocean - one for replay and one for rebuild, or, since the replay doesn't actually let you change the pipeline script yet through blue ocean (AFAIK) and the rebuild plugin truly redo the current build exactly as it was the first time, I vote that if the rebuild plugin is present, make the re-run button trigger a rebuild instead of a replay. I would prefer the latter since it prevents confusion, but would be a potentially breaking change for other users.

          Brian Saville added a comment - jamesdumay , this would be extremely helpful for us as well. We heavily use pipeline jobs, and modify them often through the Job DSL plugin. Since the re-run button currently does a replay, it will use the old pipeline script instead of the latest one. The rebuild plugin does some nice things as well such as maintain the same build parameters and causes. Causes are especially important to us because it can trigger different behavior based on what caused the build in the first place. IMHO, I think we should either have two buttons available in blue ocean - one for replay and one for rebuild, or, since the replay doesn't actually let you change the pipeline script yet through blue ocean (AFAIK) and the rebuild plugin truly redo the current build exactly as it was the first time, I vote that if the rebuild plugin is present, make the re-run button trigger a rebuild instead of a replay. I would prefer the latter since it prevents confusion, but would be a potentially breaking change for other users.

          Karl Parry added a comment - - edited

          Rebuild is used a lot in my company. We are still in early transition state and a "lot" of users keep using re-run thinking it is rebuild (Rebuild Plugin we use for the old interface)

          Karl Parry added a comment - - edited Rebuild is used a lot in my company. We are still in early transition state and a "lot" of users keep using re-run thinking it is rebuild (Rebuild Plugin we use for the old interface)

          Yair Ogen added a comment -

          ragesh_nair we also need a rebuild button. steps are skipped if we just hit re-run. is this planned to be supported?

          Yair Ogen added a comment - ragesh_nair we also need a rebuild button. steps are skipped if we just hit re-run. is this planned to be supported?

          Devyn Goetsch added a comment -

          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".

          Devyn Goetsch added a comment - 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".

          Matt Kucia added a comment -

          I wonder why this issue is minor. I would expect that button in Blue Ocean to be "Rebuild".
          Replay does not work for pipelines with dynamic agents generating very confusing errors.

          I've been seeing confusion among developers pretty much since BlueOcean was released.

          Matt Kucia added a comment - I wonder why this issue is minor. I would expect that button in Blue Ocean to be "Rebuild". Replay does not work for pipelines with dynamic agents generating very confusing errors. I've been seeing confusion among developers pretty much since BlueOcean was released.

            ragesh_nair ragesh_nair
            jimklimov Jim Klimov
            Votes:
            16 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated: