-
-
Save kzorluoglu/37c40c5d4522f73142fe6eb56acbe180 to your computer and use it in GitHub Desktop.
GitLab CI FTP deploy with mwienk/docker-lftp docker image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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