What is the best development to production route with Laravel project.
Current dev tools: XAMPP 7.0 (with php 7 and mysql) on local machine with developers fav IDE on Windows 10.
Current production tools: Apache2 with php7 and mysql on Ubuntu 14 running on AWS EC2
Current process:
Development happens on local machine.
Code is Committed in git and branch pushed to bitbucket
Pull request is created.
Code review and Merge to master.
On prod server, git pull origin master && composer install && php artisan migrate && php artisan cache:clear to deploy the code.
This process is becoming difficult to manage as the team size is growing.
Well, the first 4 steps are unlikely to change.. but you could automate step 5 with something like travis, jenkins or bamboo.
Configure one of those three continuous integration services to run tests on PRs, and then also run tests after merges to master, and execute the deployment.
You are right step 1-4 doesn't change and really the pain point is testing before it goes to prod, we do not have unit test cases, we do manual testing and it is right now directly on production server (dangerous, thou we first in local dev env), there is no test or staging env.
So yeah, look at adding continuous integration to your workflow to handle automatically running tests, and automatically deploying code based on pull requests and merges.
Bamboo & CircleCI are maybe the best options for you, given that you're using bitbucket.
A staging server can certainly be beneficial, but you don't necessarily need a staging server if you have good test coverage, are using continuous integration and don't merge things with failing tests.
It would probably be wise to adopt a git-flow process as well.
@omniware There are also a couple of videos on the topic from mediacurrent, live presentations at various Drupal conferences... I didn't link to those because the audio is not great, but they specifically talk about gitflow with a team, on bigger projects, so might be worth looking at after those first three.
@willvincent I am thru the tutorials you shared, now I understand the flow I need to have, but I am thinking to replicate what git flow does instead of asking all my developers to learn gitflow and start following new process.
I will change step 4 to Merge to develop branch and the moment something merge to develop branch it will be pushed to a staging server, where we also do run the phpunit tests (which we now plan to write) as well do manual testing.
Then I can merge the develop branch to master that would automatically push code to prod server.
I hope this plan would work, any suggestions here?
There's really not much to 'learn' just use the git plugin. Or if you use a gui git client, most of them support gitflow already.
It would be best to have your whole team using that approach, and unless they're not very smart it shouldn't take them more than maybe a day to understand it enough to do it.