The Selective Builds setting provides change detection for your builds. Enabling it allows you to only trigger a build of an app if certain files or folders have been modified.
You may want to use this setting if:
- You have multiple apps in a single repository.
- Multiple apps share common files in your repository.
The appropriate Service credential user must be set on your app’s Team page. This user must have an admin right for the GitHub repository of the project. Read more about setting up the Service credential user.
Setting up Selective builds ⚓
- Click on your app on your Dashboard.
- Click Settings in the top navigation bar.
Find the ENABLE SELECTIVE BUILDS option and toggle the switch on the right.
- Add filenames and file paths in the ADD FILENAME/PATH window. You can add multiple files or file paths here. A build will be triggered only if these files are changed.
Patterns in the file name or file path ⚓
You do not need to set an exact file name or file path for the Selective builds feature: you can set patterns. Using regular expressions is not supported but the pattern may contain certain metacharacters:
*: Matches all files.
*a: Matches all files beginning with a.
a*: Matches all files containing an a.
**: Matches directories recursively.
?: Matches any one character.
\: Escapes the next metacharacter.
[set]: Matches any one character in set.
You can trigger and abort builds with the Bitrise API. Define parameters for the build: for example, branch, tag or git commit to use. Custom environment variables can be defined...
Both incoming and outgoing webhooks can be set up with the Bitrise API. They are important for automatic build triggering and the reporting of build events to other services.
You can schedule your builds to run automatically at a specific time of the week so that you can check your logs when it's most convenient for you.