Continuous Integration Strategy at Laravel

Consider the following scenario:

A code-release.shscript accepts a ready-to-use branch name that translates to the Bucket git Bit repository. The web hook launches Code Ship , so all tests run as a CI strategy, where, if successful, a php script is requested in my application domain.

Now, my goal is that this script can get ready for release, so I have to

  • git pull [master]
  • composer update
  • php artisan migrate

At this point, my SCREAMS instincts do not start automatic php artisan migrate, because it will stink at some point. But this will mean the need for human intervention whenever a migration occurs, and possibly code corruption after continuous integration completes the deployment before someone manually migrates.

What I could come up with is a step to invoke database-backup.shright before the migration.

In any case, I'm sure someone out there is using Laravel and CI / CD, and I would like to know how to solve this situation.

+4
source share

Source: https://habr.com/ru/post/1650336/


All Articles