BuildCacheProfile Prerequisites
Build Cache is generally case insensitive, whereas Bazel is case sensitive. To fix this, add/BuildCacheProfile="<IB installation folder>\BuildCache Profiles\BuildCache_profile_bazel.xml" to the BuildConsole command.
Profile Prerequisites
Incredibuild interception requires processes spawned by Incredibuild. Bazel is a long-running service which means it cannot be intercepted by the current build if started earlier. Bazel must therefore be restarted by BuildConsole. Thebazel.ib_profile.xml includes <PreBuildStep Filepath="path\to\bazel.exe shutdown"/> at the xml root level, and bazel and java listed in the Tools list with AllowIntercept="true".
In order for the Bazel process shutdown command to work:
- Edit
bazel.ib_profile.xmland edit the path to bazel.exe in<PreBuildStep Filepath="path\to\bazel.exe shutdown" /> - To activate this, add
/Profile="<IB installation folder>\Profiles\bazel.ib_profile.xml"to the BuildConsole command.
Confirm with your Customer Success representative whether your Incredibuild 10.37.0 installation ships with the built-in Bazel profile. If it does not, create a profile XML file (as shown above) and reference it in your build command, as described in Creating a Profile XML File.
Running a Build
Run your Bazel build through BuildConsole, pointing/Profile at your profile XML file and /BuildCacheProfile to the Bazel Build Cache profile: