Adding a Slack webhook
You can set up a webhook on to send automated messages on Slack about your Bitrise builds.
Legacy Slack webhook integration
This guide describes the legacy Slack webhook integration.
You can register the bitrise-webhooks
URL as an outgoing webhook.
Once the URL is registered, check the usage section for all the accepted and required parameters you can define in the message, and for a couple of examples.
Getting the webhook URL for Slack
Admin access only
Only users with the role of admin on the app's team can access all functions of the App Settings page of an app.
-
Open your app on Bitrise.
-
On the main page of the app, click on the App Settings icon:
.
-
Go to your app’s page on Bitrise.
-
On the left, select Integrations.
-
Click
. -
Choose Slack from the dropdown menu.
-
Copy the webhook URL.
Usage: the message format
Your message has to be in the format: key:value|key:value|...
, where the supported keys
are:
At least one of these two parameters are required:
-
b
orbranch
- example:branch: master
-
w
orworkflow
- example:workflow: primary
Other, optional parameters:
-
t
ortag
- example:branch: master|tag: v1.0
-
c
orcommit
- example:workflow: primary|commit: eee55509f16e7715bdb43308bb55e8736da4e21e
-
m
ormessage
- example:branch: master|message: ship it!!
Parameter requirements
At least either branch
or workflow
has to be specified, and you can specify both if you want to. You’re free to specify any number of optional parameters.
You can also send environment variables that will be available in your workflow with the format: env[KEY1]:value1|ENV[KEY2]:value2
An example with all parameters included:
workflow: primary|b: master|tag: v1.0|commit:eee55509f16e7715bdb43308bb55e8736da4e21e|m: start my build!|ENV[DEVICE_NAME]:iPhone 6S|ENV[DEVICE_UDID]:82667b4079914d4aabed9c216620da5dedab630a