Commit f296bc31 authored by Alberto Bertogli's avatar Alberto Bertogli

cirrus: Allow the testing user to write to $GOPATH

Cirrus CI caches the module directory inside $GOPATH so it can be shared
between test runs, to speed them up.

However, it is currently created as root, which causes new entries to
fail since they run under the "testing" user.

This patch fixes that problem by making the "testing" user own the
entire $GOPATH, which includes the module directory.
parent 4c28efcb
Pipeline #146837457 passed with stages
in 8 minutes and 34 seconds
......@@ -17,6 +17,8 @@ linux_task:
folder: $GOPATH/pkg/mod
get_script: |
useradd --create-home --user-group testing
chown -R testing:testing $GOPATH/
su testing -c "go mod download"
su testing -c "go get ./..."
build_script: |
su testing -c "go build ./..."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment