2017-10-26 00:22:00 +00:00
|
|
|
# Deploy to FTP(S) server from Drone CI
|
|
|
|
|
|
|
|
[![Docker Stars](https://img.shields.io/docker/stars/cschlosser/drone-ftps.svg)](https://hub.docker.com/r/cschlosser/drone-ftps/)
|
|
|
|
[![Docker Pulls](https://img.shields.io/docker/pulls/cschlosser/drone-ftps.svg)](https://hub.docker.com/r/cschlosser/drone-ftps/)
|
|
|
|
[![Docker Build](https://img.shields.io/docker/build/cschlosser/drone-ftps.svg)](https://hub.docker.com/r/cschlosser/drone-ftps/)
|
|
|
|
[![Docker Layers](https://images.microbadger.com/badges/image/cschlosser/drone-ftps.svg)](https://hub.docker.com/r/cschlosser/drone-ftps/)
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2018-02-06 21:10:06 +00:00
|
|
|
You have to set the username and password for your FTP server in the `FTP_USERNAME` and `FTP_PASSWORD` secret.
|
2017-10-26 00:22:00 +00:00
|
|
|
|
|
|
|
### Basic
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
pipeline:
|
|
|
|
deploy:
|
|
|
|
image: cschlosser/drone-ftps
|
|
|
|
hostname: example.com:21
|
2018-02-06 21:10:06 +00:00
|
|
|
secrets: [ ftp_username, ftp_password ]
|
2017-10-26 00:22:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Optional settings
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
secure: true | false (default true)
|
|
|
|
|
|
|
|
dest_dir: /path/to/dest (default /)
|
|
|
|
|
|
|
|
src_dir: /path/to/src (default ./)
|
|
|
|
|
|
|
|
exclude: (egrep like pattern matching)
|
|
|
|
- ^\.git/$
|
|
|
|
- ^\.gitignore$
|
|
|
|
- ^\.drone.yml$
|
|
|
|
|
|
|
|
include: like exclude
|
|
|
|
```
|
|
|
|
|
|
|
|
Full file:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
pipeline:
|
|
|
|
deploy:
|
|
|
|
image: cschlosser/drone-ftps
|
|
|
|
hostname: example.com:21
|
2018-02-06 21:10:06 +00:00
|
|
|
secrets: [ ftp_username, ftp_password ]
|
2018-02-12 22:24:42 +00:00
|
|
|
secure: true (default) | false # true = use FTP(S), false = FTP without SSL
|
|
|
|
verify: true (default) | false # true = strong SSL verification, false = supress SSL verification error
|
2018-03-02 10:33:19 +00:00
|
|
|
chmod: true (default) | false # true = chmod after file transferred, false = no chmod after file transferred
|
2018-03-05 02:07:13 +00:00
|
|
|
clean_dir: true | false (default) # true = clean destination directory before transferring files, false = don't clean
|
2017-10-26 00:22:00 +00:00
|
|
|
dest_dir: /var/www/mysite
|
|
|
|
src_dir: /mysite/static
|
|
|
|
exclude:
|
|
|
|
- ^\.git/$
|
|
|
|
- ^\.gitignore$
|
|
|
|
- ^\.drone.yml$
|
|
|
|
include:
|
|
|
|
- ^*.css$
|
|
|
|
- ^*.js$
|
|
|
|
- ^*.html$
|
2018-02-06 21:10:06 +00:00
|
|
|
```
|