Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. # This script should work however sftp is not supported in compiled curl so not everything fine here
  2. #
  3. # $_CI* vars should be defined in project variables
  4.  
  5. image: mwienk/docker-git-ftp
  6.  
  7. before_script:
  8. - eval `ssh-agent -s`
  9. - cat > deploy.key <(echo "$CI_SERVER_KEY")
  10. - chmod 0600 deploy.key
  11. - ssh-add deploy.key
  12. - mkdir -p ~/.ssh
  13. - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
  14. - ssh $CI_SERVER_USER@$CI_SERVER_HOST "cd $CI_SERVER_PATH; pwd"
  15.  
  16. deploy_all:
  17. stage: deploy
  18. script:
  19. - git ftp init -u $CI_SERVER_USER --branch master --remote-root $CI_SERVER_PATH --verbose --key deploy.key --insecure sftp://$CI_SERVER_HOST
  20. - ssh $CI_SERVER_USER@$CI_SERVER_HOST "cd $CI_SERVER_PATH; composer update"
  21. only:
  22. - master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement