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

Need a way to copy empty directories with Publish Over SSH Plugin

    Details

    • Similar Issues:

      Attachments

        Issue Links

          Activity

          Hide
          jek Jörg Eichhorn added a comment -

          Sorry for escalating this, but for our company this is urgently needed:

          If you're using an application framework which relies on certain directories being there although they may be empty and try to deploy your application with this publisher you end up with a corrupt deployment. For this reason we need to zip all the contents before publishing and unzip afterwards.

          Show
          jek Jörg Eichhorn added a comment - Sorry for escalating this, but for our company this is urgently needed: If you're using an application framework which relies on certain directories being there although they may be empty and try to deploy your application with this publisher you end up with a corrupt deployment. For this reason we need to zip all the contents before publishing and unzip afterwards.
          Hide
          outspoken Ken Garland added a comment -

          can you use rsync instead?

          Show
          outspoken Ken Garland added a comment - can you use rsync instead?
          Hide
          jek Jörg Eichhorn added a comment -

          Yes, of course. We used to use rsync and it works fine. But we wanted to switch over to a more integrated configuration experience: Configure the target hosts in the jenkins configuration and refer to this configuration from a job., use include patterns as in every other place within the build jobs and so on. So this is not a real blocker, but would make life a lot easier. Not to mention that rsync is not available on Windows hosts, in contrast to jenkins and its plugins.

          Show
          jek Jörg Eichhorn added a comment - Yes, of course. We used to use rsync and it works fine. But we wanted to switch over to a more integrated configuration experience: Configure the target hosts in the jenkins configuration and refer to this configuration from a job., use include patterns as in every other place within the build jobs and so on. So this is not a real blocker, but would make life a lot easier. Not to mention that rsync is not available on Windows hosts, in contrast to jenkins and its plugins.
          Hide
          outspoken Ken Garland added a comment -

          then it would be best for the author or someone who is willing to contribue to allow extra params to pass to scp. the -r switch should be sending empty directories. check the source of the plugin to see if this is part of the default parameters, in the worst case you can add it yourself.

          Show
          outspoken Ken Garland added a comment - then it would be best for the author or someone who is willing to contribue to allow extra params to pass to scp. the -r switch should be sending empty directories. check the source of the plugin to see if this is part of the default parameters, in the worst case you can add it yourself.
          Hide
          jek Jörg Eichhorn added a comment -

          Hi Ken, thanks for your helpful comments, I really appreciate your input!

          I've already had a look at the source to find the exact source fragment involved in this, but I was not successful on the first run. Maybe I find more time later. In the meantime I would appreciate any hints on which source files to start for this feature.

          Show
          jek Jörg Eichhorn added a comment - Hi Ken, thanks for your helpful comments, I really appreciate your input! I've already had a look at the source to find the exact source fragment involved in this, but I was not successful on the first run. Maybe I find more time later. In the meantime I would appreciate any hints on which source files to start for this feature.
          Hide
          bap bap added a comment -

          I have a solution for this - it will just take a week or two for me to fit it into my backlog.

          In the mean time can you use the decades old trick of zero length hidden files? i.e. touch .keep in any leaf directory that yo want to be present on the target machine. (you can even use find in the Exec command to remove them afterwards if you need the dirs to be completely empty)
          Alternatively keep zipping until a new version is released.

          Show
          bap bap added a comment - I have a solution for this - it will just take a week or two for me to fit it into my backlog. In the mean time can you use the decades old trick of zero length hidden files? i.e. touch .keep in any leaf directory that yo want to be present on the target machine. (you can even use find in the Exec command to remove them afterwards if you need the dirs to be completely empty) Alternatively keep zipping until a new version is released.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: bap2000
          Path:
          src/main/java/jenkins/plugins/publish_over/BPBuildInfo.java
          src/main/java/jenkins/plugins/publish_over/BPTransfer.java
          src/main/java/jenkins/plugins/publish_over/FileFinder.java
          src/main/java/jenkins/plugins/publish_over/FileFinderResult.java
          src/main/java/jenkins/plugins/publish_over/options/GlobalDefaults.java
          src/main/java/jenkins/plugins/publish_over/options/TransferOptions.java
          src/main/resources/jenkins/plugins/publish_over/view_defaults/BPTransfer/Messages.properties
          src/main/resources/jenkins/plugins/publish_over/view_defaults/BPTransfer/Messages_no_BV.properties
          src/test/java/jenkins/plugins/publish_over/BPBuildInfoTest.java
          src/test/java/jenkins/plugins/publish_over/BPTransferTest.java
          src/test/java/jenkins/plugins/publish_over/BapPublisherTest.java
          src/test/java/jenkins/plugins/publish_over/FileFinderTest.java
          http://jenkins-ci.org/commit/publish-over-plugin/d2b08c13cec1e6bb02d1df89344adfeaeb921500
          Log:
          [FIXED JENKINS-13126] [FIXED JENKINS-13831] Option to create empty directories

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: bap2000 Path: src/main/java/jenkins/plugins/publish_over/BPBuildInfo.java src/main/java/jenkins/plugins/publish_over/BPTransfer.java src/main/java/jenkins/plugins/publish_over/FileFinder.java src/main/java/jenkins/plugins/publish_over/FileFinderResult.java src/main/java/jenkins/plugins/publish_over/options/GlobalDefaults.java src/main/java/jenkins/plugins/publish_over/options/TransferOptions.java src/main/resources/jenkins/plugins/publish_over/view_defaults/BPTransfer/Messages.properties src/main/resources/jenkins/plugins/publish_over/view_defaults/BPTransfer/Messages_no_BV.properties src/test/java/jenkins/plugins/publish_over/BPBuildInfoTest.java src/test/java/jenkins/plugins/publish_over/BPTransferTest.java src/test/java/jenkins/plugins/publish_over/BapPublisherTest.java src/test/java/jenkins/plugins/publish_over/FileFinderTest.java http://jenkins-ci.org/commit/publish-over-plugin/d2b08c13cec1e6bb02d1df89344adfeaeb921500 Log: [FIXED JENKINS-13126] [FIXED JENKINS-13831] Option to create empty directories
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: bap2000
          Path:
          src/main/java/jenkins/plugins/publish_over_ssh/BapSshTransfer.java
          src/main/java/jenkins/plugins/publish_over_ssh/descriptor/BapSshTransferDescriptor.java
          src/main/java/jenkins/plugins/publish_over_ssh/options/SshOverrideTransferDefaults.java
          src/main/resources/jenkins/plugins/publish_over_ssh/BapSshTransfer/config.jelly
          src/main/resources/jenkins/plugins/publish_over_ssh/BapSshTransfer/help-makeEmptyDirs.html
          src/main/resources/jenkins/plugins/publish_over_ssh/options/SshOverrideTransferDefaults/config.jelly
          src/test/java/jenkins/plugins/publish_over_ssh/BapSshClientTest.java
          src/test/java/jenkins/plugins/publish_over_ssh/BapSshHostConfigurationTest.java
          src/test/java/jenkins/plugins/publish_over_ssh/jenkins/IntegrationTest.java
          src/test/java/jenkins/plugins/publish_over_ssh/jenkins/LegacyConfigurationTest.java
          http://jenkins-ci.org/commit/publish-over-ssh-plugin/02b6aa8c02abf62072f3ecdde9020932bd0f3a55
          Log:
          [FIXED JENKINS-13831] Option to create empty directories

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: bap2000 Path: src/main/java/jenkins/plugins/publish_over_ssh/BapSshTransfer.java src/main/java/jenkins/plugins/publish_over_ssh/descriptor/BapSshTransferDescriptor.java src/main/java/jenkins/plugins/publish_over_ssh/options/SshOverrideTransferDefaults.java src/main/resources/jenkins/plugins/publish_over_ssh/BapSshTransfer/config.jelly src/main/resources/jenkins/plugins/publish_over_ssh/BapSshTransfer/help-makeEmptyDirs.html src/main/resources/jenkins/plugins/publish_over_ssh/options/SshOverrideTransferDefaults/config.jelly src/test/java/jenkins/plugins/publish_over_ssh/BapSshClientTest.java src/test/java/jenkins/plugins/publish_over_ssh/BapSshHostConfigurationTest.java src/test/java/jenkins/plugins/publish_over_ssh/jenkins/IntegrationTest.java src/test/java/jenkins/plugins/publish_over_ssh/jenkins/LegacyConfigurationTest.java http://jenkins-ci.org/commit/publish-over-ssh-plugin/02b6aa8c02abf62072f3ecdde9020932bd0f3a55 Log: [FIXED JENKINS-13831] Option to create empty directories

            People

            • Assignee:
              bap bap
              Reporter:
              devzebra Dev Zebra
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: