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

Allow archiving of empty directories to be enabled/disabled

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      From time to time I have found it would be handy to be able to add an empty directory to the archive. eg. directory for log files.

      I have noticed that this was deliberately disabled in JENKINS-3227 however it would be great if there was a configurable option to enable/disable archiving empty directories.

          [JENKINS-9146] Allow archiving of empty directories to be enabled/disabled

          Michael Ford created issue -
          Michael Ford made changes -
          Link New: This issue is related to JENKINS-3227 [ JENKINS-3227 ]
          kutzi made changes -
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]

          For us, this is more than a "Minor" priority issue - it's causing the application that was written to expect the folder to be there to fail. I don't understand the logic behind why this was set to never allow you to copy empty directories. The build itself always has the ability to remove empty directories if they aren't desired before archiving. However, if you do desire empty directories in the artifacts, then with this change in, it is impossible to implement this. If, for example, we did not have the source code (vendor binary package), and we used Jenkins as our enterprise solution for "packaging", there would be no work-around. There is always a work-around for "deleting" unnecessary directories from a build, though - don't create them - delete in build script - added "batch command" build step - etc. I think this alone is enough to justify at least an option to include empty directories.

          dougbrinkmeier added a comment - For us, this is more than a "Minor" priority issue - it's causing the application that was written to expect the folder to be there to fail. I don't understand the logic behind why this was set to never allow you to copy empty directories. The build itself always has the ability to remove empty directories if they aren't desired before archiving. However, if you do desire empty directories in the artifacts, then with this change in, it is impossible to implement this. If, for example, we did not have the source code (vendor binary package), and we used Jenkins as our enterprise solution for "packaging", there would be no work-around. There is always a work-around for "deleting" unnecessary directories from a build, though - don't create them - delete in build script - added "batch command" build step - etc. I think this alone is enough to justify at least an option to include empty directories.

          Lukáš Vasek added a comment -

          please in what state is this request?
          It's needed to have empty directories.
          +1

          Lukáš Vasek added a comment - please in what state is this request? It's needed to have empty directories. +1

          We need to have empty directories as well, is there at least any work-around?

          Radka Nepejchalova added a comment - We need to have empty directories as well, is there at least any work-around?

          Daniel Beck added a comment -

          Straightforward workaround: Zip/Tar the build result up as part of the build. Archive those files.

          Daniel Beck added a comment - Straightforward workaround: Zip/Tar the build result up as part of the build. Archive those files.

          Casey McGinty added a comment -

          My build output is 3GB. I really have to zip that to get 1 empty dir? Thanks!

          Casey McGinty added a comment - My build output is 3GB. I really have to zip that to get 1 empty dir? Thanks!

          René Schwarz added a comment -

          I also strongly support this request. There should be no alteration of the build artifacts at all, unless the user explicitly chooses to enable this "feature".

          René Schwarz added a comment - I also strongly support this request. There should be no alteration of the build artifacts at all, unless the user explicitly chooses to enable this "feature".
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 139302 ] New: JNJira + In-Review [ 175055 ]

            Unassigned Unassigned
            michaelford Michael Ford
            Votes:
            19 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated: