Trigger a build from Slack, now with custom environment variables!

TL;DR; you can now include custom environment variables in your Builds triggerd from Slack! This is possible thanks to @nobre84 , who implemented this feature and sent us the pull request 🚀

TL;DR; you can now include custom environment variables in your Builds triggerd from Slack! This is possible thanks to @nobre84, who implemented this feature and sent us the pull request 🚀

A very short technical summary about how triggering a build through webhooks works: bitrise.io only supports our Build Trigger API. This API is used by the web interface when you start a build manually, as well as you can call it via curl or from any other tool (more info on our DevCenter).

So then how are webhooks handled?

It's really simple. We use a "webhook transformer" server. This server has a single purpose, it transforms service specific webhook calls (e.g. GitHub, Bitbucket, Slack, VSTS, Gogs, ... webhook formats) to Bitrise.io Build Trigger API calls, performs the call and then returns the response (build started / failed to start the build).

The code of the server is open source, you can run it on your own servers, change anything in the code and send us a Pull Request with your changes. We run the latest release version on hooks.bitrise.io. This is how we now have Environment Variable parameter support for the Slack webhooks (thanks to @nobre84's Pull Request), as well as Gogs service support (thanks to @crrobinson14's Pull Request)!

How to use the new (Slack) Environment Variables option?

If you used Slack to trigger builds before then all you need to know is the format of the environment variable parameter: ENV[THE_ENV_KEY]: the env value.

E.g. if you want to trigger a build on the master branch, and you want to specify IS_DEBUG=true as an environment variable:

/bitrise branch: master | ENV[IS_DEBUG]: true

That's all! You can of course specify multiple env vars, just like you would specify multiple parameters, separated by a pipe (|) character.

For more information about how you can configure a webhook for your Slack channel (to be able to trigger builds from Slack), and to see all the options you can use for triggering a build from Slack check out the related guide on GitHub.

Have fun, and Happy Building! 🚀

No items found.
The Mobile DevOps Newsletter

Explore more topics

App development

Best practices from engineers on how to use Bitrise to build better apps, faster.

Community

Meet other Bitrise engineers, technology experts, power users, partners and join our BUGs.

Company

All the updates about Bitrise events, sponsorships, employees, and more.

Insights

Mobile development, latest tech, industry insights, and interviews with experts.

Mobile DevOps

Learn why mobile development is unique and requires a set of unique practices.

Releases

Stay tuned for the last updates, new features, and product improvements.

The Mobile DevOps Newsletter

Join 1000s of your peers. Sign up to receive Mobile DevOps tips, news, and best practice guides once every two weeks.