In heterogeneous environments containing different operating systems and CPU architectures (such as Linux x86_64, Linux ARM64, Windows, and macOS), a single binary archive or shell script cannot run across all nodes.
To address this, Jenkins allows attaching multiple installers to a single tool definition and restricting each installer with a label expression:
-
Click Add Installer under the tool definition.
-
In the installer configuration, locate the Label field (for the Extract *.zip/*.tar.gz installer, it is under the advanced options).
-
Enter the label expression that target agents must match (for example, linux && x86_64, windows, or macos).
-
Add another installer under the same tool with a different label expression (for example, linux && arm64) pointing to the corresponding architecture-specific package.
When an agent executes a build requiring that tool, Jenkins evaluates the installers in the order they are listed, and runs only the first installer that applies to that agent.
An installer applies if it has no label, or if its label expression matches the agent.
Later installers are not run, even if they also match.
Because of this, place more specific label expressions before general ones, and put an installer without a label last, as a fallback.
If no installer applies, Jenkins logs that the tool cannot be installed on that agent.
Label-restricted installers cover auto-installed tools.
For pre-installed tools whose path differs between agents, use the per-agent Tool Locations property described below instead.