I'm currently setting up a Jenkins pipeline for a web application and am wondering which methods of deployment are most common or recommended.
Currently Jenkins polls the SCM for new commits and triggers build when there are new commits.
Assume that the build process is:
composer install
phpunit tests
rsync workspace to staging server
behat --profile staging
Question is how to deploy?
Should I rsync the files directly from the jenkins workspace which have already run the build process and passed unit tests? Or should I hold a clone of the repository on the staging/production servers and trigger a git pull
and then a subsequent build on the server to deploy to?
Or anything else I haven't thought of?