Advertisement
Guest User

.gitlab-ci.yml

a guest
Mar 7th, 2019
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. image: registry.gitlab.com/obbi-dev/api-obbi-v2.1
  2.  
  3. services:
  4. - mysql:5.7
  5.  
  6. variables:
  7. MYSQL_DATABASE: homestead
  8. MYSQL_ROOT_PASSWORD: secret
  9. DB_HOST: mysql
  10. DB_USERNAME: root
  11.  
  12. stages:
  13. - test
  14. - deploy
  15.  
  16. unit_test:
  17. stage: test
  18. script:
  19. - cp .env.example .env
  20. - composer install
  21. - php artisan key:generate
  22. - php artisan migrate
  23. - vendor/bin/phpunit
  24.  
  25. deploy_dev:
  26. stage: deploy
  27. script:
  28. - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  29. - eval $(ssh-agent -s)
  30. - ssh-add <(echo "$SSH_PRIVATE_KEY")
  31. - mkdir -p ~/.ssh
  32. - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
  33.  
  34. - ~/.composer/vendor/bin/envoy run deploy
  35. environment:
  36. name: development
  37. url: http://apis.devobbi.com
  38. only:
  39. - master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement