Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- image: registry.gitlab.com/obbi-dev/api-obbi-v2.1
- services:
- - mysql:5.7
- variables:
- MYSQL_DATABASE: homestead
- MYSQL_ROOT_PASSWORD: secret
- DB_HOST: mysql
- DB_USERNAME: root
- stages:
- - test
- - deploy
- unit_test:
- stage: test
- script:
- - cp .env.example .env
- - composer install
- - php artisan key:generate
- - php artisan migrate
- - vendor/bin/phpunit
- deploy_dev:
- stage: deploy
- script:
- - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- - eval $(ssh-agent -s)
- - ssh-add <(echo "$SSH_PRIVATE_KEY")
- - mkdir -p ~/.ssh
- - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- - ~/.composer/vendor/bin/envoy run deploy
- environment:
- name: development
- url: http://apis.devobbi.com
- only:
- - master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement