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

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

    XMLWordPrintable

Details

    Attachments

      Issue Links

        Activity

          devzebra Dev Zebra created issue -
          devzebra Dev Zebra made changes -
          Field Original Value New Value
          Priority Blocker [ 1 ] Minor [ 4 ]

          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.

          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.
          jek Jörg Eichhorn made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          outspoken Ken Garland added a comment -

          can you use rsync instead?

          outspoken Ken Garland added a comment - can you use rsync instead?

          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.

          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.
          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.

          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.

          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.

          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.
          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.

          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.
          bap bap made changes -
          Link This issue is related to JENKINS-13126 [ JENKINS-13126 ]

          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

          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

          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

          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
          scm_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          bap bap made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 144299 ] JNJira + In-Review [ 205866 ]

          For your information, all publish-over-ssh component type JENKINS issues related to the Publish Over SSH plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues

          Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues/216
          And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-ssh-plugin/issues?q=%22JENKINS-13831%22

          (Note: this is an automated bulk comment)

          gmcdonald Gavin McDonald added a comment - For your information, all publish-over-ssh component type JENKINS issues related to the Publish Over SSH plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues/216 And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-ssh-plugin/issues?q=%22JENKINS-13831%22 (Note: this is an automated bulk comment)

          People

            bap bap
            devzebra Dev Zebra
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: