https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
says variable CI_SERVER="yes" is available in all versions of Gitlab.
(cherry picked from commit
ddf46056ca6afa6352c360be4a0d7e336f2b6fd1)
# shellcheck source=conf.sh
. ${builddir}/conf.sh
-if [ "$(id -u)" -eq "0" ] && [ "@DEVELOPER_MODE@" != "yes" ]; then
+if [ "$CI_SERVER" != "yes" ] && [ "$(id -u)" -eq "0" ] && [ "@DEVELOPER_MODE@" != "yes" ]; then
echofail "Refusing to run test as root. Build with --enable-developer to override." >&2
exit 1
fi