diff options
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | Makefile | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f14361e56..2591e48a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -104,7 +104,7 @@ include: # But the actual tests should run unprivileged. This assures that we pay # proper attention to permission bits and that we don't modify the source # directory. - - setpriv --reuid=${TEST_UID} --regid=${TEST_UID} --clear-groups --no-new-privs make ${TEST_TARGET} SKIP_RSPEC_BUILD=YesPlease $(test "${GIT_VERSION}" = default && echo WITH_BUNDLED_GIT=YesPlease) + - setpriv --reuid=${TEST_UID} --regid=${TEST_UID} --clear-groups --no-new-privs make ${TEST_TARGET} UNPRIVILEGED_CI_SKIP=YesPlease $(test "${GIT_VERSION}" = default && echo WITH_BUNDLED_GIT=YesPlease) after_script: - | @@ -339,7 +339,10 @@ export GITALY_TESTING_GIT_BINARY ?= ${GIT_PREFIX}/bin/git endif .PHONY: prepare-tests -prepare-tests: libgit2 prepare-test-repos ${SOURCE_DIR}/.ruby-bundle ${GOTESTSUM} ${GITALY_PACKED_EXECUTABLES} +prepare-tests: libgit2 prepare-test-repos ${SOURCE_DIR}/.ruby-bundle ${GOTESTSUM} +ifndef UNPRIVILEGED_CI_SKIP +prepare-tests: ${GITALY_PACKED_EXECUTABLES} +endif ${Q}mkdir -p "$(dir ${TEST_REPORT})" .PHONY: prepare-test-repos @@ -384,10 +387,10 @@ rspec: prepare-tests ${Q}cd ${GITALY_RUBY_DIR} && PATH='${SOURCE_DIR}/internal/testhelper/testdata/home/bin:${PATH}' bundle exec rspec # This is a workaround for our unprivileged CI builds. We manually execute the -# build target as privileged user, but then run the rspec target unprivileged. +# build target as privileged user, but then run other targets unprivileged. # We thus cannot rebuild binaries there given that we have no permissions to # write into the build directory. -ifndef SKIP_RSPEC_BUILD +ifndef UNPRIVILEGED_CI_SKIP rspec: build endif |