go offline builds

Elan Ruusamäe glen at pld-linux.org
Tue Sep 7 07:58:51 CEST 2021


so, how to tell go not to try to download and test those .mod files?

+ go build -ldflags '-X 
gitlab.com/gitlab-org/gitlab-runner/common.VERSION=13.12.0 -X 
gitlab.com/gitlab-org/gitlab-runner/common.REVISION=05161b14 -X 
gitlab.com/gitlab-org/gitlab-runner/common.BRANCH=v13.12.0 -X 
-B 0xa57b752b73b6887bec85d38cc0f611b460527f0e' -a -v go: cloud.google.com/go/storage at v1.12.0: Get "https://proxy.golang.org/cloud.google.com/go/storage/@v/v1.12.0.mod": dial tcp connect: connection refused
error: Bad exit status from /tmp/B.u4171lt3/BUILD/tmp/rpm-tmp.NIo6js 

it's not a problem that sources are missing, the go mod vendor did not 
download any new files:

cd src/gitlab.com/gitlab-org/gitlab-runner

cp -a vendor/ vendor.old

go mod vendor

diff -ur vendor.old/ vendor

go version go1.16.6 linux/amd64

More information about the pld-devel-en mailing list