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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: ws-cleanup-plugin
    • Labels:
    • Environment:
    • Similar Issues:

      Description

      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

      <publishers>
        <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup@0.26">
          <deleteDirs>false</deleteDirs>
          <skipWhenFailed>false</skipWhenFailed>
          <cleanWhenSuccess>true</cleanWhenSuccess>
          <cleanWhenUnstable>true</cleanWhenUnstable>
          <cleanWhenFailure>true</cleanWhenFailure>
          <cleanWhenNotBuilt>true</cleanWhenNotBuilt>
          <cleanWhenAborted>true</cleanWhenAborted>
          <notFailBuild>false</notFailBuild>
          <cleanupMatrixParent>false</cleanupMatrixParent>
          <externalDelete/>
        </hudson.plugins.ws__cleanup.WsCleanup>
      </publishers>
      <buildWrappers>
        <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.26">
          <deleteDirs>false</deleteDirs>
          <cleanupParameter/>
          <externalDelete/>
        </hudson.plugins.ws__cleanup.PreBuildCleanup>
      </buildWrappers>
      

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

      <buildWrappers>
        <hudson.plugins.ws__cleanup.PreBuildCleanup plugin="ws-cleanup@0.26">
          <deleteDirs>false</deleteDirs>
          <cleanupParameter/>
          <externalDelete/>
        </hudson.plugins.ws__cleanup.PreBuildCleanup>
      </buildWrappers>
      

      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.

        Attachments

          Activity

          Hide
          looselytyped Raju Gandhi added a comment -

          I am also seeing the following under administrativeMonitor/OldData/manage when I POST a configuration over the command line

          Type Name Error
          hudson.model.FreeStyleProject Test1 CannotResolveClassException: hudson.plugins.ws_cleanup.WsCleanup
          Show
          looselytyped Raju Gandhi added a comment - I am also seeing the following under administrativeMonitor/OldData/manage when I POST a configuration over the command line Type Name Error hudson.model.FreeStyleProject Test1 CannotResolveClassException: hudson.plugins.ws_cleanup.WsCleanup
          Hide
          looselytyped Raju Gandhi added a comment -

          Oh boy. Apparently a restart makes the issue go away.

          Closing this issue.

          Show
          looselytyped Raju Gandhi added a comment - Oh boy. Apparently a restart makes the issue go away. Closing this issue.
          Hide
          looselytyped Raju Gandhi added a comment -

          Restarting Jenkins seems to fix the issue.

          Show
          looselytyped Raju Gandhi added a comment - Restarting Jenkins seems to fix the issue.

            People

            Assignee:
            vjuranek vjuranek
            Reporter:
            looselytyped Raju Gandhi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: