diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-05-30 08:57:49 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-05-30 10:16:32 +0300 |
commit | 031365ec43491b585d35bd35e6e9518e9d36831e (patch) | |
tree | 1c1f199b2e184e4f6c2ab8cab94a7f712d741152 | |
parent | a6c5964bb455f77a0c79898f0b99c4c7df3aee3a (diff) |
ci: Fix test reports not being uploadedpks-ci-fix-test-reports
With 1c112bb7c (ci: Move test reports into temporary directory,
2022-01-13), we have moved our test reports into a temporary directory
to prepare for running tests as an unprivileged user. This change broke
our ability to upload these test reports as artifacts though because
GitLab only supports artifacts which are relative to the build root.
Fix this issue by instead writing test reports into a new directory in
our build root that's writeable by the unprivileged test user.
-rw-r--r-- | .gitlab-ci.yml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4c75e7e8..9608b3be4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,11 +84,14 @@ include: PGUSER: postgres POSTGRES_DB: praefect_test POSTGRES_HOST_AUTH_METHOD: trust - TEST_REPORT: /tmp/go-tests-report.xml - TEST_COVERAGE_DIR: /tmp/coverage + TEST_REPORT: _unprivileged/go-tests-report.xml + TEST_COVERAGE_DIR: _unprivileged before_script: &test_before_script - go version - while ! psql -h $PGHOST -U $PGUSER -c 'SELECT 1' > /dev/null; do echo "awaiting Postgres service to be ready..." && sleep 1 ; done && echo "Postgres service is ready!" + # Create a directory for the unprivileged user that we're running tests as. + # This is required so that we can still store test reports successfully. + - install --directory --owner=9999 --group=9999 _unprivileged artifacts: paths: - ruby/tmp/gitaly-rspec-test.log |