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

don't create remote directory when there are no files to publish

XMLWordPrintable

      We have a general build pipeline script that is reused by all our projects. It publishes some files to a documentation server with the sshPublisher step. But some projects don't have any documentation, and I would like to have no empty directory created for that project in that case.

      We see the following:

      SSH: Connecting from host [dc45dd1bbce5]
      SSH: Connecting with configuration [doc.cbss.inet] ...
      SSH: Disconnecting configuration [doc.cbss.inet] ...
      SSH: Transferred 0 file(s)
      

      So no files are transferred, but the configured remoteDirectory is still created, as specified in the documentation:

      remoteDirectory: Optional destination folder.
      This folder will be below the one in the global configuration, if present.
      The folder will be created if does not exist.

      I tried to specify makeEmptyDirs = false but that has no effect. I don't think that setting applies to the remoteDirectory.

            Unassigned Unassigned
            jpraet Jimmy Praet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: