Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
103 lines (79 sloc) 2.26 KB
date title author tags logo repo image
2018-04-23 00:00:00 +0000
Download
drone-plugins
download
tarball
archive
retrieve
download.svg
drone-plugins/drone-download
plugins/download

Use the Download plugin to download archives required for your builds, it also integrates a secure way to inject basic authentication credentials and checking by md5 or sha256 checksums. The below pipeline configuration demonstrates simple usage:

pipeline:
  download:
    image: plugins/download
    source: https://github.com/drone/drone-cli/releases/download/v0.8.5/drone_linux_amd64.tar.gz

Example configuration with custom destination:

pipeline:
  download:
    image: plugins/download
    source: https://github.com/drone/drone-cli/releases/download/v0.8.5/drone_linux_amd64.tar.gz
+   destination: drone_linux.tar.gz

Example configuration basic auth:

pipeline:
  download:
    image: plugins/download
+   username: octocat
+   password: password
    source: https://github.com/drone/drone-cli/releases/download/v0.8.5/drone_linux_amd64.tar.gz

Example configuration using a secret:

pipeline:
  download:
    image: plugins/download
-   username: octocat
-   password: password
+   secrets: [ download_username, download_password ]
    source: https://github.com/drone/drone-cli/releases/download/v0.8.5/drone_linux_amd64.tar.gz

Example configuration using MD5 checksum:

pipeline:
  download:
    image: plugins/download
    source: https://github.com/drone/drone-cli/releases/download/v0.8.5/drone_linux_amd64.tar.gz
+   md5: a0524c59d5c45bf2e924465115836d37

Example configuration using SHA256 checksum:

pipeline:
  download:
    image: plugins/download
    source: https://github.com/drone/drone-cli/releases/download/v0.8.5/drone_linux_amd64.tar.gz
+   sha256: a16f709bc5402727366ca91ba85bba07c0f084a33ce9ab7fe03b8093c4027314

Secret Reference

download_username : Username for basic auth

download_password : Password for basic auth

Parameter Reference

source : Source URL for the download

destination : Destination for the download

username : Username for basic auth

password : Password for basic auth

skip_verify : Skip SSL verification

md5 : Checksum in MD5 format

sha256 : Checksum in SHA256 format