How to config Bitbucket Pipelines for Symfony 4

June 5, 2019

alt text

Automate as much as possible your project should be a requirement. If you are working with the latest version of Symfony and your repository is Bitbucket, you should be using the Pipelines feature.

Basically, Bitbucket Pipelines allows you to automate your tests and deployments. Every commit pushed to the repository will run automatically the scripts you add to your pipelines.

The main problem to solve here is that you need to config a specific environment to run your test and to execute some scripts. For example, install dependencies using Composer, run PHPUnit tests with the PHP version you have in your production server, …

I created a Docker Image already uploaded to Docker Hub ready to use. You can see here the details.

You only have to enable Bitbucket Pipelines and add the file bitbucket-pipelines.yml to the root of your project with your own scripts and that’s it.

Happy Coding!

Posted by Miguel Ángel Martín @miguelbemartin
June 5, 2019