Class CliProvisioner
java.lang.Object
org.jenkinsci.plugins.cortexcloud.scanner.CliProvisioner
Resolves an executable cortexcli binary onto the build node.
Resolution order (the CLI is distributed as a single static Go binary, so no
JRE is required on the agent):
1. Override path - if the global config specifies a pre-installed CLI path, and
it exists on the agent, use it as-is.
2. Per-agent cache - if a previously downloaded binary (matching the expected
checksum) is already cached on this node, reuse it.
3. Download - otherwise request a signed URL + checksum from the tenant API,
download the binary, verify its checksum, mark it executable, and cache it.
The checksum algorithm is inferred from the hex length the tenant returns
(32=MD5, 40=SHA-1, 64=SHA-256), because the tenant returns an MD5 digest in
practice.
All filesystem work goes through FilePath so it executes correctly on remote
agents, not just the controller.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CliProvisioner
-
-
Method Details
-
resolve
public String resolve(FilePath nodeRoot, FilePath workspace, String overridePath) throws IOException, InterruptedException Resolves the CLI binary and returns its remote path on the agent.- Parameters:
nodeRoot- the agent's root FilePath (for the cache); may be nullworkspace- the build workspace (fallback cache location)overridePath- optional pre-installed CLI path from global config (may be null/blank)- Returns:
- the executable CLI path on the agent
- Throws:
IOExceptionInterruptedException
-