Customizing bitrise.yml

Any tool that can edit bitrise.yml can add custom properties to it. This way you can add special properties or notes to your env vars, or even try new configurations of your workflow in bitrise.yml. All you have to add is add a meta field and a namespace label with key and value to the right place.

The format you should use is the following:

opts: {
  title: "My env var"
  description: "Description of my env var."
  summary: "Summary of env var."
  meta: {
    custom_namespace_id_1: {
      key1: "value1",
      key2: "value2",
    custom_namespace_id_2: {

Let’s see some use cases when you would benefit from customizing bitrise.yml to your own liking:

Of course this use case works only if your customized tool is shared with your team in your company’s own intranet or if it’s handled by some software.

Customizing bitrise.yml

Changing the stack type in the bitrise.yml file

Currently, you can’t set the default stack type for an app’s builds directly in the bitrise.yml file of the app. You can only set it on the Stacks tab of the Workflow Editor.

If you head back to the bitrise.yml tab, a meta is added to the deploy workflow:

    - activate-ssh-key@4.0.3:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone@4.0.11: {}
    - script@1.1.5:
        title: Do anything with Script step
    - npm@0.9.1:
        - command: install
    - install-missing-android-tools@2.2.0:
        - gradlew_path: "$PROJECT_LOCATION/gradlew"
    - android-build@0.9.5:
        - project_location: "$PROJECT_LOCATION"
        - module: "$MODULE"
        - variant: "$BUILD_VARIANT"
    - certificate-and-profile-installer@1.10.1: {}
    - xcode-archive@2.4.14:
        - project_path: "$BITRISE_PROJECT_PATH"
        - scheme: "$BITRISE_SCHEME"
        - export_method: "$BITRISE_EXPORT_METHOD"
        - configuration: Release
    - deploy-to-bitrise-io@1.3.15: {}
        stack: osx-xcode-10.1.x

Since this meta is only interpreted on and not locally or on Bitrise CLI, it is categorized by a namespace (where the stack is the key and linux-docker-android-lts is the value). Workflow Editor always validates the saved variable and throws an error if there is a syntax error, but with meta added, its content is fully ignored by the Workflow Editor validation process.

More information on the available stacks is available in the infrastructure section. The names of the stacks listed in the system_reports directory are the names to use in the stack field.