From 8b2b72499fb49fa2c01c806b54e2bfe6a2c28844 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Fri, 6 Oct 2023 11:12:41 -0700 Subject: [PATCH] CI: run jenkins as batman (#30184) * I'm batman * chown batman * sudo * add batman to sudo group * try without cleanup * Revert "try without cleanup" This reverts commit f59554f2f373417f2c59fd250463eca2fda4d49e. * comment --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 176c82bcc9..e748dc7dbf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -81,10 +81,14 @@ def pcStage(String stageName, Closure body) { checkout scm - def dockerArgs = '--user=root -v /tmp/comma_download_cache:/tmp/comma_download_cache -v /tmp/scons_cache:/tmp/scons_cache'; + def dockerArgs = '--user=batman -v /tmp/comma_download_cache:/tmp/comma_download_cache -v /tmp/scons_cache:/tmp/scons_cache'; docker.build("openpilot-base:build-${env.GIT_COMMIT}", "-f Dockerfile.openpilot_base .").inside(dockerArgs) { timeout(time: 20, unit: 'MINUTES') { try { + // TODO: remove these after all jenkins jobs are running as batman (merged with master) + sh "sudo chown -R batman:batman /tmp/scons_cache" + sh "sudo chown -R batman:batman /tmp/comma_download_cache" + sh "git config --global --add safe.directory '*'" sh "git submodule update --init --recursive" sh "git lfs pull"