Getting Started: PHP
Buddy allows you to create delivery pipelines that will build, test and deploy your PHP application on a single push to branch. The pipelines consists of actions that you can configure to your needs.
The configuration is very easy and will only take a couple of minutes.
1. Select your Git repository
Buddy supports all popular Git hosting providers, including GitHub, Bitbucket and Gitlab. You can also use your own private Git server or host code directly on Buddy.
2. Add a new delivery pipeline
Enter the pipeline’s name and determine the trigger mode and the branch from which Buddy will fetch your code:
INFO: Trigger mode:
- Manual (on click) – recommended for Production
- On push (automatic) – recommended for Development
- Recurrently (on time interval) – recommended for Staging/Testing
INFO: Branch assignment
This is the branch from which Buddy will deploy. If you set the trigger mode to On push, Buddy will execute the pipeline upon every push to that branch.
3. Add actions
Buddy lets you choose from dozens of predefined actions. In this example, we’ll add 3 actions that will perform the following tasks:
- PHP - download Composer dependencies and run unit tests
- Gulp - compile our assets
- SFTP - upload code to the server together with the compiled assets
Look up and click the PHP action to configure it. Here you can choose the version of PHP and determine the commands to execute. The default commands are:
composer install phpunit
Next, add a Gulp action that will compile your assets and minify the code (you can find it in the Build Tools & Task Runners section).
INFO: Buddy supports Grunt and NPM tasks as well. In general, you’re able to perform any operation that you need.
The last step in our pipeline is deployment: head to the Transfer section and select your action (SFTP in our case):
When adding the action you can choose what and where should be uploaded:
INFO: Buddy’s deployment is based on changesets. This means only changed files are deployed which makes it very fast.
Bear in mind that it’s only brief example what Buddy can achieve—the possibilites are almost unlimited. If you have any questions, feel free to contact us at firstname.lastname@example.org.
Need more inspiration? Make sure to check this articles:
- AWS Integration—upload files to S3 / deploy to Elastic Beanstalk / invalidate CloudFront and more
- Slack integration—trigger pipelines directly from Slack / notify your team
- YAML—pipeline configuration as a code
- Advanced pipeline configuration—trigger on push / manual approvements / parametrized pipelines