chore: support configurable Go module proxy
This commit is contained in:
@@ -24,6 +24,7 @@ def workspace_output(root: Path, value: str) -> tuple[Path, str]:
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--image", default="golang:1.25", help="Docker image (default: golang:1.25)")
|
||||
parser.add_argument("--goproxy", default="", help="optional Go module proxy passed to the container")
|
||||
parser.add_argument("--gomaxprocs", type=int, default=4)
|
||||
parser.add_argument("--load", action="store_true", help="also run the isolated server matrix")
|
||||
parser.add_argument("--tls", action="store_true", help="run the load matrix over TLS")
|
||||
@@ -70,8 +71,10 @@ def main() -> None:
|
||||
"-w", "/workspace",
|
||||
"-e", "GOWORK=off",
|
||||
"-e", f"GOMAXPROCS={args.gomaxprocs}",
|
||||
args.image, "sh", "-c", command,
|
||||
]
|
||||
if args.goproxy:
|
||||
docker_args += ["-e", f"GOPROXY={args.goproxy}"]
|
||||
docker_args += [args.image, "sh", "-c", command]
|
||||
print(f"Linux verification image: {args.image}", flush=True)
|
||||
print(f"Linux verification command: {command}", flush=True)
|
||||
result = subprocess.run(docker_args, cwd=root)
|
||||
|
||||
Reference in New Issue
Block a user