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

cleanWs in pipeline post block rendered after every stage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • blueocean-plugin
    • None
    • Jenkins 2.176.2, Blue Ocean 1.18.1

      We have a pipeline with a single pipeline-level post block to do a workspace cleanup upon success:

          post {
              success {
                  cleanWs deleteDirs: true
              }
          }
      

      The rest of the pipeline has a variety of sequential and parallel stages – I can supply some specifics if they might be significant. However, every stage as rendered in the Blue Ocean UI shows a final step of "true – Delete workspace when build is done", complete with the corresponding console log from this:

      The console log from the classic UI confirms that this step is only occurring once, at the very end (as expected).

      I saw JENKINS-47251 as a similar issue but resolved, and perhaps specific to the use of a script block.

            Unassigned Unassigned
            medianick Nick Jones
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: