jeudi 2 février 2017

How to deploy laravel app on digitalocean after succesfull test pass on Gitalab CI

I have managed to succesfully run laravel test build on Gitlab CI using Gitlab Runner on digitaocean (With help from tutorial HOW TO: LARAVEL TESTING ON GITLAB CI WITH DOCKER)

Now I am wondering how I can deploy it after succesfull test.

This is my deploy process on my staging env:

cd MY_PROJECT_ROOT_DIR
git reset --hard HEAD
git checkout master
git pull
composer install
composer update
php artisan migrate
php artisan db:seed

How I can manage to include this deploy after test is done?

My configuration of GitLab Runner is the same as those files on this repo

This is the content of my .gitlab-ci.yml file:

before_script:
  - bash .gitlab-ci.sh

variables:
  MYSQL_DATABASE: laravel
  MYSQL_ROOT_PASSWORD: secret

phpunit:php-laravel-env:mysql:
  image: woohuiren/php-laravel-env:latest
  services:
    - mysql:latest
  script:
    - php vendor/bin/phpunit --colors

How I should change this file in order to execute deploy script after test passed?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2k6qrFq
via IFTTT

Aucun commentaire:

Enregistrer un commentaire