Set UID/GID for ARC runner builds (#27638)

* Set UID/GID for ARC runner builds

* Set GOCACHE

* Reverted GOCACHE change

* Remove accidental changes

* Removed unnecessary change
This commit is contained in:
fheinecke 2023-06-08 22:47:08 -05:00 committed by GitHub
parent be477555af
commit 541fb41fe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,9 +71,17 @@ ifeq ("$(DRONE)","true")
CI := true CI := true
endif endif
ifeq ("$(CI)","true") ifeq ("$(CI)","true")
# The UID/GID of the runner user on ARC runners is 1001, not 1000
# This var is currently only set for ARC runners via https://github.com/gravitational/cloud-terraform/pull/2473
ifeq ("$(CI_SYSTEM)","ARC")
UID := 1001
GID := 1001
NOROOT := -u 1001:1001
else
UID := 1000 UID := 1000
GID := 1000 GID := 1000
NOROOT := -u 1000:1000 NOROOT := -u 1000:1000
endif
# if running in CI and the GOCACHE environment variable is not set, set it to a sensible default # if running in CI and the GOCACHE environment variable is not set, set it to a sensible default
ifeq ("$(GOCACHE)",) ifeq ("$(GOCACHE)",)
GOCACHE := /go/cache GOCACHE := /go/cache