Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37445

Cleanup post-build steps executed twice for build flow projects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • build-flow-plugin
    • None
    • Jenkins version: 2.7.1
      build-flow-plugin version: 0.20 (works with 0.19)

      Symptom
      performAllBuildSteps(listener, project.getPublishersList(), false) is called twice in "Build Flow" projects leading to problems like duplicated mail sending.

      Cause
      Commit 89a9037 changed the base class of BuildWithWorkspaceRunnerImpl from AbstractRunner to BuildExecution. Because BuildWithWorkspaceRunnerImpl.cleanUp calls super.cleanUp (com/cloudbees/plugins/flow/FlowRun.java:204) this adds the cleanUp from BuildExecution on top of the cleanUp from BuildWithWorkspaceRunnerImpl.

      Solution
      If the only goal with commit 89a9037 was to get rid of the deprecation warning then the easiest solution is to extend from AbstractBuildExecution instead of BuildExecution. This will give the exact same behavior as extending AbstractRunner but without the deprecation warning.

            Unassigned Unassigned
            laros Lars Erik Rosengren
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: