Selective Builds allows you to trigger a build of an app only when certain files are changed.
This is useful when:
-
You have multiple apps in single git repository (iOS and Android, or multiple apps share some common files in your repository).
-
You want to skip builds for committed files that are unrelated to your project’s source files. For example,
README.md
or.gitignore
.
When determining the list of files that have changed for a pull request, buddybuild considers all files associated with the pull request, from the branch point to the latest change.
Tip
|
Do you want to avoid builds for specific commits? Check out Skipping a build. |
-
Visit the buddybuild dashboard.
-
Click App Settings in the top navigation bar. The App Settings page is displayed:
-
Find the Selective Builds row in the build configurations, and click the Configure button on the right side of the row. The Enable selective builds page is displayed:
-
Click the toggle button to enable selective builds. One of the lower panels becomes enabled:
-
Choose an approach: Only build… or Do not build…:
-
Select Only build … when you want to build only for files in some specific directories, or with some special extensions.
-
Select Do not build … when you don’t want to trigger a build when all of the files changed match at least one of the patterns (i.e. all the files fall in some specific directories, or with some special extensions)
Only one approach can be active — when you choose an approach, the other approach becomes disabled.
-
-
To add a pattern, type the pattern into the input field and click the Add button. The pattern is added to the list of patterns.
-
Once you have finished configuring selective build patterns, click the Close button near the top-right of the page. The App Settings page is displayed, and the current approach and patterns are indicated in the Selective Builds row:
-
ios/**
: all files with full path that starts withios/
(i.e. any files in theios
directory) -
**/*.java
: all files with full path that ends with.java
(i.e. any files with the.java
extension) -
README.md
: theREADME.md
file in the root directory of your repository (doesn’t matchios/README.md
) -
**/README.md
: theREADME.md
file in all directories (includingREADME.md
in root directory of your repository) -
ios/**/*.[mh]
: all files with the extension.m
or.h
, in theios
directory and all of its subdirectories -
ios/*.[mh]
: files with the extension.m
or.h
only under theios
directory (but not its subdirectories) -
configs/server[0-2].ini
: the filesserver0.ini
,server1.ini
,server2.ini
in the directoryconfigs/
More patterns can be found in the gitignore pattern format documentation.