fix(P1): set Go env vars in ci-run.sh — shell-isolated executor drops them
Release / ci (push) Failing after 6m14s
Release / container-orca (push) Has been skipped
Release / container-traefik (push) Has been skipped

CoreCI's buildIsolatedEnv does NOT forward GOROOT, GOPATH, GOCACHE,
GOMODCACHE (they're in the systemVars deny-list in pass_through.go).
The shell-isolated executor's env only has PATH, HOME, LANG, TMPDIR,
TERM, CI + CORECI_* + CI_* + job vars. Without GOMODCACHE/GOCACHE, Go
commands fail (can't find module/build cache). Fix: re-derive them from
the go binary on PATH via 'go env GOROOT' etc.

---ci---
project: orca
phase: 1
milestone: v0.16
status: execute
---/ci---
This commit is contained in:
Jon Chery
2026-08-12 21:37:01 +00:00
parent e55dfed716
commit 4a97cb1ea2
+11
View File
@@ -19,6 +19,17 @@ if [ -z "$JOB" ]; then
exit 1
fi
# CoreCI's shell-isolated executor (buildIsolatedEnv) does NOT forward
# Go toolchain env vars (GOROOT, GOPATH, GOCACHE, GOMODCACHE are in the
# systemVars deny-list). Re-derive them from the `go` binary on PATH so
# Go commands work in the shell-isolated executor.
if command -v go >/dev/null 2>&1; then
export GOROOT="${GOROOT:-$(go env GOROOT)}"
export GOPATH="${GOPATH:-$(go env GOPATH)}"
export GOCACHE="${GOCACHE:-$(go env GOCACHE)}"
export GOMODCACHE="${GOMODCACHE:-$(go env GOMODCACHE)}"
fi
info() { echo "ci-run: $*"; }
err() { echo "ci-run: error: $*" >&2; exit 1; }