ci: prepare unprivileged user for checkout (#10900)

Job `test-e2e` uses an unprivileged user to compile and run tests.
Ensure that the user has ssh and git properly configured to checkout
dependencies.
This commit is contained in:
Mahmood Ali
2021-07-14 16:12:04 -04:00
committed by GitHub
parent 7c962b54ad
commit 86bbb9abe5

View File

@@ -339,6 +339,11 @@ jobs:
echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
chown -R circleci:circleci /go
# configure git and ssh for the user
cp -r ~/.ssh /home/circleci/.ssh
chown -R circleci:circleci /home/circleci/.ssh
sudo -H -u circleci git config --global url."ssh://git@github.com".insteadOf "https://github.com"
- run: sudo -E -H -u circleci PATH=${PATH} make deps
- run: sudo -E -H -u circleci PATH=${PATH} make integration-test
- run: sudo -E -H -u circleci PATH=${PATH} make e2e-test