After all CloudBees Build Acceleration components are installed and you are familiar with the concepts, try a test build. Using a text editor, create a makefile with the following content:
UNIX
all: aa bb cc aa: @echo building aa @sleep 10 bb: @echo building bb @sleep 10 cc: @echo building cc @sleep 10
Windows
SLEEP=ping -n 10 -w 1000 localhost>NUL all: aa bb cc aa: @echo building aa -$(SLEEP) bb: @echo building bb -$(SLEEP) cc: @echo building cc -$(SLEEP)
“ping” is used in the Windows example because Windows does not have a SLEEP utility. |
If you were to run this file with GNU Make, you would expect it to finish in approximately 30 seconds—allowing for each 10-second command to run serially. Running against a CloudBees Build Acceleration cluster with at least three Agents, the commands run in parallel allowing the build to complete much faster.
To start this sample build:
-
Specify the Cluster Manager by using the
--emake-cm=<host>
option. The Cluster Manager is responsible for assigning Agents to eMake for processing jobs. The example uses “linuxbuilder” as the Cluster Manager host. -
Make sure the eMake root directory (or directories) specification includes all directories that contain source or input files required by the build. In the example, the only source file is the makefile, which is in the same directory where eMake is invoked. Because the default emake root is the current directory,
--emake-root=<path>
is not needed.
% emake --emake-cm=linuxbuilder
Starting build: 1 building aa building bb building cc Finished build: 1 Duration: 0:11(m.s) Cluster availability: 100%
Cluster availability: 100% indicates the cluster was fully available for the build duration. For more information on cluster sharing and the cluster availability metric, see Annotation.