Skip to content

Commit

Permalink
ci: prepare unprivileged user for checkout (#10900)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mahmood Ali committed Jul 14, 2021
1 parent 7c962b5 commit 86bbb9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86bbb9a

Please sign in to comment.