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

Learn how to optimize your mobile app deployment processes for iOS, Android, Flutter, ReactNative, and more

Bitrise & Community

Check out the latest from Bitrise and the community. Learn about the upcoming mobile events, employee spotlights, women in tech, and more

Mobile App Releases

Learn how to release faster, better apps on the App Store, Google Play Store, Huawei AppGallery, and other app stores

Mobile DevOps

Learn Mobile DevOps best practices such as DevOps for iOS, Android, and industry-specific DevOps tips for mobile engineers

Mobile Testing & Security

Learn how to optimize mobile testing and security — from automated security checks to robust mobile testing and more.

Product Updates

Check out the latest product updates from Bitrise — Build Insights updates, product news, and more.

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.