Report missing Docker clearly and preserve CI attempt setup
Some checks failed
Build, test and publish / verify (push) Failing after 3m9s

This commit is contained in:
2026-10-29 09:23:24 +01:00
parent 069b62ae92
commit 19fffe2cd3
4 changed files with 15 additions and 4 deletions

View File

@@ -40,7 +40,9 @@ class Pipeline {
void run(String... args) throws Exception { result(true, args).checked(); }
void requirePlatform() throws Exception {
String target = Setup.required(env,"TARGET_PLATFORM");
String arch = capture("docker", "info", "--format", "{{.Architecture}}");
var docker = result(false,"docker", "info", "--format", "{{.Architecture}}");
check(docker.code() == 0, "Docker is unavailable; start Docker Desktop before running CI (details in verify.log)");
String arch = docker.output().strip();
arch = switch (arch) { case "x86_64" -> "amd64"; case "aarch64" -> "arm64"; default -> arch; };
String nativePlatform = capture("docker", "info", "--format", "{{.OSType}}") + "/" + arch;
check(target.equals(nativePlatform), "Target " + target + " differs from Docker host " + nativePlatform);