Skip to content

Instantly share code, notes, and snippets.

@kzorluoglu
Forked from vojtasvoboda/.gitlab-ci.yml
Created February 4, 2019 16:03
Show Gist options
  • Save kzorluoglu/37c40c5d4522f73142fe6eb56acbe180 to your computer and use it in GitHub Desktop.
Save kzorluoglu/37c40c5d4522f73142fe6eb56acbe180 to your computer and use it in GitHub Desktop.
GitLab CI FTP deploy with mwienk/docker-lftp docker image
stages:
- test
- deploy
cache:
paths:
- vendor
# test job
test:
stage: test
image: edbizarro/gitlab-ci-pipeline-php:7.1
script:
- sudo composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
- vendor/bin/phpunit --configuration phpunit.xml
# upload job, see https://lftp.yar.ru/lftp-man.html
upload:
stage: deploy
image: mwienk/docker-lftp:latest
script:
- lftp -e "set ftp:ssl-allow false; mirror -eRnv app web/app; exit;" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
only:
- master
when: on_success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment