From 86bbb9abe58ef0b0b98ba570dbafea947fb99bf8 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Wed, 14 Jul 2021 16:12:04 -0400 Subject: [PATCH] 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. --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a4cec135..b1cd52dda 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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