Builds are the results of running scenario; they are environment specific, they need to be defined on the Blackfire.io Environment page.
Scenarios are run from the Blackfire's servers. If the profiled application
is behind a firewall, let the Blackfire servers access the application by
22.214.171.124 in your configuration for
the web ports (usually
Periodic builds are only available to our Premium and Enterprise users.
Periodic builds allows you to run your scenarios on a regular basis. That's a must on production servers.
Only public websites can be targeted by Blackfire to run scheduled scenarios. In general, if your environment is configured as a development environment, you will need to use our PHP SDK. Check your Endpoint and dev Environment configuration in the Dashboard's "Settings" tab of your environment.
Starting a build with a webhook offers the most flexible way of triggering Blackfire scenarios based on third-party tool events. Thereby, you can add performance tests at any point of your tool-chain. For instance, you can:
The webhook is only available to our Enterprise users.
1 2 3 4
curl -X POST https://blackfire.io/api/v1/build/env/ENV-UUID/webhook \ --user "CLIENT-ID:CLIENT-TOKEN" \ -d "endpoint=http://symfony.com/" \ -d "title=Build title"
ENV-UUID by your environment UUID (and
by your personal credentials if needed).
The webhook endpoint accepts the following request parameters:
||The endpoint to profile|
||A hash of keys/values. For example with curl:
||The username for HTTP Basic authentication|
||The password for HTTP Basic authentication|
||The IP for forcing DNS|
||Disable SSL certificates verification (this is unsecure)|
||A unique identifier for the build; commonly, a unique reference from a third party service like the Git commit sha1 related to the build|
||The unique identifier of the parent build|
||A URL related to the build, like a Pull Request|
You can also trigger a build via the Blackfire CLI:
1 2 3 4 5 6 7 8 9 10 11
blackfire build-trigger \ http://example.com/ \ --env=ENV-UUID \ --title="Build PR 1234" \ --external-id=`git log -1 --pretty=\"%H\"` \ --external-parent-id=`git merge-base master HEAD` \ --external-url="https://github.com/symfony/symfony/pull/11882" \ --http-password="http-password" \ --http-username="http-username" \ --ip="127.0.0.1" \ --ssl-no-verify
If you are going to use the webhook from a shared service (like a Jenkins server), we recommend that you create a specific "bot" user to be used for automation like triggering webhooks from your continuous integration platform.
Blackfire environment pages provide a simple form (in the Dashboard
that lets you configure a webhook payload and generate the corresponding
cURL command. For your convenience, you can even trigger a build from there.