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

Hey everyone!

Hi @LeoTM! Thanks for pointing that out, we’ll make sure to bump the priority of the item if we can.

@ReggiePret, we’re not aware of any ongoing issues, please consider submitting a more detailed report in a separate thread or by contacting us directly.

It looks very unusual for this step to be used locally since it operates on environment variables injected by bitrise.io. However, if you deploy files to some server and inject appropriate variables with URLs on your own then it should work in theory.

I am writing down how you can h [Bitrise] configs locally, on your Mac/Linux -

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]
  • Note: the CLI is open source , find repo and code [here].
  1. Open your Terminal / Command Line

  2. Just to be sure, if you’ve just installed the CLI, run: bitrise setup (This will prepare everything required for running the builds/tools.)

4. Prepare a bitrise.yml / config :

  • 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. Basicallly I have previously used this step on retail erp software in India and related. So here it works properly.

  • 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:

  1. mkdir /tmp/bitrise-experiment

  2. cd /tmp/bitrise-experiment 3. bitrise init --minimal 4. That’s all, the init will generate a base bitrise.yml config for you in the directory you run the bitrise init command in

  3. Once you have the config you can either edit the bitrise.yml manually, or use the Workflow Editor , which is part of the CLI!

  • To open the Workflow Editor just run bitrise :workflow-editor in the directory where the bitrise.yml is located.
  1. Ready for running a “build”? You can run it in your Terminal / Command Line with bitrise run WORKFLOW-ID .
  • Run this command in your Terminal / Command-Line in the directory where the bitrise.yml is located at.
  • 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!