Adding A CI/CD process to my work flow is one of the really quick wins I do on every serious project I work on.
Whilst most of my personal work is hosted on Gitlab, a recent project I was working had its code in Bitbucket. This was my first time working with Bitbucket, so I wanted to document how I built assets, linted and ran tests using its pipelines.
By the end of this article you should have a working
bitbucket-pipelines.yml file for your Laravel project which will do the following:
composerto install your projects dependencies
php-cs-fixerto enforce a code style
larastanto run static analysis against the code base
phpunitto run our projects test suite
- For a production build
yarn run production
- Allow us to manually trigger a deployment to production using Laravel Deployer.