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 f59554f2f3.

* comment
old-commit-hash: 8b2b72499f
laptop
Justin Newberry 2 years ago committed by GitHub
parent ef8028f134
commit 845cb6b670
  1. 6
      Jenkinsfile

6
Jenkinsfile vendored

@ -81,10 +81,14 @@ def pcStage(String stageName, Closure body) {
checkout scm 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) { docker.build("openpilot-base:build-${env.GIT_COMMIT}", "-f Dockerfile.openpilot_base .").inside(dockerArgs) {
timeout(time: 20, unit: 'MINUTES') { timeout(time: 20, unit: 'MINUTES') {
try { 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 config --global --add safe.directory '*'"
sh "git submodule update --init --recursive" sh "git submodule update --init --recursive"
sh "git lfs pull" sh "git lfs pull"

Loading…
Cancel
Save