Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This script should work however sftp is not supported in compiled curl so not everything fine here
- #
- # $_CI* vars should be defined in project variables
- image: mwienk/docker-git-ftp
- before_script:
- - eval `ssh-agent -s`
- - cat > deploy.key <(echo "$CI_SERVER_KEY")
- - chmod 0600 deploy.key
- - ssh-add deploy.key
- - mkdir -p ~/.ssh
- - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- - ssh $CI_SERVER_USER@$CI_SERVER_HOST "cd $CI_SERVER_PATH; pwd"
- deploy_all:
- stage: deploy
- script:
- - git ftp init -u $CI_SERVER_USER --branch master --remote-root $CI_SERVER_PATH --verbose --key deploy.key --insecure sftp://$CI_SERVER_HOST
- - ssh $CI_SERVER_USER@$CI_SERVER_HOST "cd $CI_SERVER_PATH; composer update"
- only:
- - master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement