altaris / webdav-upload

A simple docker image to upload a file over WebDAV 🐳

Home Page:https://hub.docker.com/r/altaris/webdav-upload/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webdav-upload

Docker Pulls GitHub

A simple docker image to upload a file over WebDAV.

The upload script reads the following environment variables:

  • FILE: File to upload.
  • PASSWORD: Password used to authenticate.
  • SERVER: URL to the WebDAV server.
  • USER: User used to authenticate.
  • VERBOSE (default: no): A non yes value is considered no. God knows what information might get exposed, be careful with this!
  • WEBDAV_PATH (default: empty path): Path where the file should be uploaded.
  • WEBDAV_PREFIX (default: remote.php/dav/files): See after.
  • WEBDAV_USER (default: USER): User who owns the directory where the file should be uploaded.

The URL where the FILE will be uploaded is thus

$SERVER/$WEBDAV_PREFIX/$WEBDAV_USER/$WEBDAV_PATH

Example

As a drone plugin

Assuming your drone repository has secrets user, password, and server:

upload:
  file: build/project.tar.gz
  image: altaris/webdav-upload
  secrets:
    - source: user
      target: USER
    - source: password
      target: PASSWORD
    - source: server
      target: SERVER
  webdav_path: my/dope/project/project.tar.gz

or equivalently, if the server address isn't a secret:

upload:
  file: build/project.tar.gz
  image: altaris/webdav-upload
  secrets:
    - source: user
      target: USER
    - source: password
      target: PASSWORD
  server: cloud.mcnope.com
  webdav_path: my/dope/project/

About

A simple docker image to upload a file over WebDAV 🐳

https://hub.docker.com/r/altaris/webdav-upload/

License:MIT License


Languages

Language:Shell 82.1%Language:Makefile 11.6%Language:Dockerfile 6.3%