How to experiment with Bitrise configs locally, on your Mac/Linux

Do you want to run a custom script in your builds or do you want to experiment with things you just found on the DevCenter, but would love to make the process faster? Read Bitrise CTO Viktor Benei's guide.

Do you want to run a custom script in your builds or do you want to experiment with things you just found on the DevCenter, but would love to make the process faster?

Here's how to do that, it’s actually super simple:

  1. Install the Bitrise CLI, which is the exact same runner which runs the builds on the bitrise.io VMs. You can find it here.
  2. Note: the CLI is open source, find repo and code here.
  3. Open your Terminal / Command Line
  4. Just to be sure, if you've just installed the CLI, run: bitrise setup (This will prepare everything required for running the builds/tools.)
  5. Prepare a bitrise.yml / config:
  6. Either download your config from bitrise.io (Workflow Editor -> bitrise.yml: that’s the build config which you can download and save as a bitrise.yml file, and run it with the CLI.
  7. Or if you just want to run quick experiments, generating a new config which will only include the things you want to test might be even faster. In your Terminal / Command Line run these:
  8. mkdir /tmp/bitrise-experiment
  9. cd /tmp/bitrise-experiment
  10. bitrise init --minimal
  11. That’s all, the init will generate a base bitrise.yml config for you in the directory you run the bitrise init command in (in this example /tmp/bitrise-experiment)
  12. Once you have the config you can either edit the bitrise.yml manually, or use the Workflow Editor, which is part of the CLI!
  13. To open the Workflow Editor just run bitrise :workflow-editor in the directory where the bitrise.yml is located.
  14. Ready for running a “build”? You can run it in your Terminal / Command Line with bitrise run WORKFLOW-ID.
  15. Run this command in your Terminal / Command Line in the directory where the bitrise.yml is located at.
  16. To list all the available workflow IDs from your build config (bitrise.yml) simply run bitrise run without specifying any workflow ID, that will print an error and list all the available workflows.

That’s pretty much all. You can now experiment with your config locally (on your Mac/Linux) quickly using the tips/steps above.

If you have any questions feel free to leave a comment below!

Happy iterating! 🙂

No items found.

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.

Get the latest from Bitrise

Join other Mobile DevOps engineers who receive regular emails from Bitrise, filled with tips, news, and best practices.