Advertisement
dasper

GitLabPipeLine

Mar 25th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. image: php:7.2-fpm
  2.  
  3. services:
  4. - mysql:5.7
  5.  
  6. variables:
  7. MYSQL_DATABASE: homestead
  8. MYSQL_USER: homestead
  9. MYSQL_PASSWORD: secret
  10. MYSQL_PORT: 3306
  11. MYSQL_ROOT_PASSWORD: secret
  12.  
  13. stages:
  14. - build
  15. - test
  16. - deploy
  17.  
  18. cache:
  19. key: ${CI_COMMIT_REF_SLUG}
  20. paths:
  21. - vendor
  22. - .composer-cache
  23.  
  24. before_script:
  25. - cp .env.gitlab .env
  26.  
  27. build:
  28. stage: build
  29. script:
  30. - composer config -g cache-dir "$(pwd)/.composer-cache"
  31. - composer install --ignore-platform-reqs --optimize-autoloader --no-ansi --no-interaction --no-progress
  32.  
  33. unit_test:
  34. stage: test
  35. script:
  36. - php artisan key:generate
  37. - php artisan migrate --seed
  38. - vendor/bin/phpunit
  39.  
  40. deploy_production:
  41. stage: deploy
  42. only:
  43. - master
  44. script:
  45. - git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD $FTP_HOST
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement