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

Workspace Cleanup Plugin does not copy over "Post-build Actions"


    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • ws-cleanup-plugin

      This is a fresh install of Jenkins. I installed all the plugins (listed above).

      I then created a Job.

      • Under Build Environment I checked Delete workspace before build starts
      • In the Post-build Actions I simply selected Delete workspace when build is done with no additional changes (That is I did not click on the Advanced button)

      With that in place, I went to Jenkins->New Job and entered a new name, and then picked Copy existing Item giving it the name of the previously created job.

      Upon inspecting the configuration I noticed that

      • Under Build Environment Delete workspace before build starts is correctly selected
      • However under Post-build Actions there is nothing.

      Inspecting the config.xml file of the newly created job tells me that that portion of the configuration did not port over.

      Here is the relevant portion of the ORIGINAL job's configuration

        <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup@0.26">
        <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.26">

      Here is the same portion of the NEW job's configuration

        <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.26">

      As a final attempt I programmatically POST ed the configuration of the original job to another job and I see the same thing happening. For some reason the Post-build Actions are not being applied.

      Just to be sure, I tweaked the original job to have 2 Post-build Actions - and then created a New Job that simply is a Copy of the original one. Again, it did not port over the Delete workspace before build starts in Post-build Actions - However the other action did port over.

      If there are any other details you like me to report on, please let me know.

            vjuranek vjuranek
            looselytyped Raju Gandhi
            0 Vote for this issue
            1 Start watching this issue