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

Add option to delete existing artifacts before copy

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • copyartifact-plugin
    • None

      It would be nice if the copy artifact build step would allow users to specify that the plugin should delete artifacts from a prior run before copying. With the current behavior, the only way to prevent renamed or deleted artifacts from making there way into a job is to manually add a build step to remove the copied artifacts in each job that uses this plugin.

          [JENKINS-13388] Add option to delete existing artifacts before copy

          wernight added a comment -

          Probably better would be to rsync/mirror/delete-only-missing files. That would speed up quiet a lot!

          wernight added a comment - Probably better would be to rsync/mirror/delete-only-missing files. That would speed up quiet a lot!

          ritzmann added a comment -

          I would expand this feature request and add the option to wipe the workspace entirely. If you use an SCM, you can usually wipe the workspace in that section but if you don't, you end up having to add this as a separate build step before the Copy Artifact build step.

          ritzmann added a comment - I would expand this feature request and add the option to wipe the workspace entirely. If you use an SCM, you can usually wipe the workspace in that section but if you don't, you end up having to add this as a separate build step before the Copy Artifact build step.

          Jim Howard added a comment -

          The option to rsync the artifacts into the new workspace would be amazingly helpful. Right now, any old artifacts still in the workspace become a part of the new job unless you remove all the contents of the workspace. Having a rsync type functionality that:

          1) removes anything not in the current archive folder and
          2) only copies those items that are new or have changed

          would cut down on build/deploy time in great ways while ensuring a sane workspace.

          Jim Howard added a comment - The option to rsync the artifacts into the new workspace would be amazingly helpful. Right now, any old artifacts still in the workspace become a part of the new job unless you remove all the contents of the workspace. Having a rsync type functionality that: 1) removes anything not in the current archive folder and 2) only copies those items that are new or have changed would cut down on build/deploy time in great ways while ensuring a sane workspace.

          Kim Abbott added a comment - - edited

          Can I chime in as well that this would be a great enhancement to this plugin.  I only realized today after a bit of troubleshooting that outdated and unneeded artifacts from a prior run were still hanging around and were incorporated as a part of the current run's build.  I'm going to have to go back and update my job to wipe out the prior data very selectively.

          Kim Abbott added a comment - - edited Can I chime in as well that this would be a great enhancement to this plugin.  I only realized today after a bit of troubleshooting that outdated and unneeded artifacts from a prior run were still hanging around and were incorporated as a part of the current run's build.  I'm going to have to go back and update my job to wipe out the prior data very selectively.

            mindless Alan Harder
            davidsj2 Josh Davidson
            Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: