Report missing Docker clearly and preserve CI attempt setup
Some checks failed
Build, test and publish / verify (push) Failing after 3m9s
Some checks failed
Build, test and publish / verify (push) Failing after 3m9s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user