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

Publish over ssh with flatten creates empty directory

    Details

    • Similar Issues:

      Description

      If the source file selection returns no files then when flatten is specified an empty target directory is created. If flatten is not specified then no target directory is created when no files are selected.

      Some of my builds only produce some artifacts for release builds and I copy these to separate locations with the publish-over-ssh. It gets very cluttered if the empty directories get produced for each non-release build.

      I have a patch (pull request coming soon) that adds unit tests to show the behaviour with and without flatten specified. It also tweaks the flatten case to not produce the empty folders.

      I'm not sure if anyone depends on empty folders being produced but if necessary I'll gladly update the patch to make it a configurable option to either suppress or force empty base folders.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Richard Mortimer
          Path:
          src/main/java/jenkins/plugins/publish_over/BPTransfer.java
          src/test/java/jenkins/plugins/publish_over/BPTransferTest.java
          http://jenkins-ci.org/commit/publish-over-plugin/ad1c610c6cd0fd3b01ad81a7549418d449f9291c
          Log:
          JENKINS-10599 Publish over ssh with flatten creates empty directory
          Only create the target directory when the first file is copied.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Richard Mortimer Path: src/main/java/jenkins/plugins/publish_over/BPTransfer.java src/test/java/jenkins/plugins/publish_over/BPTransferTest.java http://jenkins-ci.org/commit/publish-over-plugin/ad1c610c6cd0fd3b01ad81a7549418d449f9291c Log: JENKINS-10599 Publish over ssh with flatten creates empty directory Only create the target directory when the first file is copied.
          Hide
          oldelvet Richard Mortimer added a comment -

          Integrated in publish-over-ssh version 1.3

          Tested all seems to be working as expected.

          Show
          oldelvet Richard Mortimer added a comment - Integrated in publish-over-ssh version 1.3 Tested all seems to be working as expected.

            People

            • Assignee:
              oldelvet Richard Mortimer
              Reporter:
              oldelvet Richard Mortimer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: