Blackfire has built-in support for Platform.sh projects. The integration is simple as Blackfire is available by default on all Platform.sh accounts.
Append the following configuration to the
.platform.app.yaml project file
to enable Blackfire on your project:
1 2 3 4 5 6
runtime: extensions: - name: "blackfire" configuration: server_id: "SERVER-ID" server_token: "SERVER-TOKEN"
This integration is only available to Enterprise users.
Follow these steps to enable automatic continuous performance testing on all your platform's environments:
Download and install the platform.phar utility;
Bind Platform.sh and Blackfire.io:
1 2 3
platform integration:add \ --type=webhook \ --url='https://CLIENT-ID:CLIENT-TOKEN@blackfire.io/api/v1/build/env/ENV_UUID/platformsh'
On the Dashboard
Builds tab, choose the
"Platform.sh" integration to get a command that is ready to be pasted with all the
variables already filled-in.
Now, whenever you push to a Platform.sh environment, Blackfire will automatically trigger a build for this specific environment. It means that Blackfire scenarios are run for all your pull requests for instance.
Moreover, if you've already set-up the synchronization between GitHub and Platform.sh, don't forget to configure the Blackfire GitHub notification channel. That way, Blackfire will be integrated into your GitHub pull requests statuses.
Here is a full video tutorial to get you started with the integration of the three services: