Executing Your Builds Using Incredibuild Linux

In order to execute your builds using Incredibuild Linux, you do not need to make any changes to your existing source code or build scripts. All you need to do is to add the some switches to your build commands as seen in the following example for make:

ib_console make -j 100

Where: 

  • ib_console must always be added

  • make can be replaced a different build command

  • -j is your multiprocessing command option. It defines the maximum number of concurrent tasks that will be provided to Incredibuild for distribution. We recommend this number be 20% higher than the cores available in your grid.

Note: To execute builds using Incredibuild, the Initiator must have a minimum number of available cores that you define in the Minimum local cores for build parameter, in the AgentSettings dialog box -> General tab. Otherwise, the build will not start.

Additional Command Line Switches

To display the help for the execution switches, enter the -h or --help parameter after the ib_console command. All switches should be added before the build command.

ib_console -h

Switch

Description

--build-cache-local-user

--build-cache-local-shared

--build-cache-local-group="groupname"

Add one of these three commands to use local Build Cache. You can specify whether the cache is accessible and shared across a single user on this machine (-user), everyone on this initiator (-shared), or a specific group of users that includes the current user (-group)

This can be used on it's own, or in addition to a Shared Cache.

Note: These parameters were changed in version 3.19. They used to be --avoid-local-user|group|shared. The original parameters will still work but may be deprecated in future releases.

--build-cache-service= <URL>

Use a Shared Cache running on a Build Cache Service defined by the protocol, an IP or hostname, and the port number of the host machine. For exampe: http://build-cache-service:8080.

We recommend using the http protocol to improve performance.

You can define a default Build Cache Service in the Agent Settings or using the CLI. If you have defined a default, you can use this parameter with no URL. If you define a default and use a different URL in the parameter, the value specified in the parameter will be used.

--build-cache-basedir=<path>

When using Build Cache, Incredibuild views files originating from different paths as cache misses, even if the files are identical. This parameter allows you to define which part of the path is NOT shared by other user running similar builds. Incredibuild will then ignore this portion of the path when determining if two files are identical.

For example, if you include usernames as part of your path, (e.g. /home/bill_gates/windows_vista/libs/src/pm-functions.cpp), you might define the basedir as /home/bill_gates/windows_vista/.

This parameter is required.

Note: This parameter was changed in version 3.19. It used to be --avoid-basedir. The original parameter will still work but may be deprecated in future releases.

-c / --caption

Specify a build name to display in the Build Caption column of the Build History. This command is for display purposes only. If you are entering more than one word as the build caption, do not use a blank space between the words. For example:

ib_console -c Test make –j 40

--check-license

Checks if a Helper Agent is subscribed or unsubscribed from the Coordinator. Returns 0 if subscribed, 255 if unsubscribed.

-d1

For log export: if a build hangs or gets stuck during execution, or if a build fails with error messages and you want to export its log, this command adds important information to the log. This command should be used during the re-executing of the build.

For more information, see Using the -d1 Command.

-f

Instructs everything in the build that is indicated as "allow_remote" to run on remote machines if possible. However, if no remote machine is available, the processes will run on the local machine.

-n

Specify a Nice value to set the priority of the process. A Nice value should be numeric and between -20 (high priority) and 19 (low priority).

To learn more about Nice, enter:

man 2 nice

--no-monitor

Do not save the build data in the database. The build record will appear in the Build History, but its data will not be displayed in the Build Monitor. This is used to improve performance in cases where you do not need to monitor a build or save it's data. For example:

ib_console --no-monitor make –j 40

--max-local-cores=N

Specify a maximum number of cores on the initiator machine to use during the build.

--no-cgroups

When running builds in a Docker container, allow Incredbuild to use resources outside of the container.

--log-remote-path<path>

When using remote log collection, this flag defines the sub-folder inside the mounted remote directory to store the build logs for this build. The sub-directory should be unique, but if it is not we will append a timestamp to the directory to make it unique.