Drone

A real SFTP Plugin

Hi guys,

during a discussion regarding the SFTP plugin (which is outdated) in this issue: https://github.com/drone-plugins/drone-sftp/issues/20.

The alternative by appleboy/drone-scp did not work in my environment as it is really just an SFTP account and shell access is not possible.

Therefore I decided to bring up my own plugin which does not work as plugin but as a regular image it does - tho I think I might have fixed it now. The main focus is on really only using SFTP instead of SCP, Shell and some mixture of everything. Use cases are chrooted environments with deployment users.

The code and docs are available here: https://github.com/hypervtechnics/drone-sftp

It worked in this form:

  • name: deploy
    image: hypervtechnics/drone-sftp
    commands:
    • dotnet /app/Drone.SFTP.dll
      environment:
      PLUGIN_HOST: somehost # The host
      PLUGIN_PORT: 22 # The port
      PLUGIN_USERNAME: # The username
      from_secret: sftp_username # Use username from secret store
      PLUGIN_PASSWORD: # The password
      from_secret: sftp_password # Use password from secret store
      PLUGIN_SOURCE: ./ # The source directory
      PLUGIN_FILTER: . # The filter for the files to upload. . is for all
      PLUGIN_TARGET: / # The target directory
      PLUGIN_CLEAR: false # Removes all files and directories in target
      PLUGIN_OVERWRITE: false # Allows overwriting already existing files

Would have put a link but not allowed too :frowning:

I made some changes to the Dockerfile to enable the drone plugin experience which isn’t tested because the hugo plugin does not work too… What a time to be alive :unamused: (and I am too lazy to setup an extra pipeline to test this…) This will be my next little project.

Any feedback?

Greedings,
me

I am not aware of any issues with the Hugo plugin. We use this plugin to publish the Drone documentation, plugin documentation and blog. I am aware of others using this plugin with success.

I mean this issue: https://github.com/drone-plugins/drone-hugo/issues/21 (open since November 2019) with no progress.

Anyways I fixed it here and am using this plugin from now on: https://github.com/hypervtechnics/drone-hugo