      }
  
      checkout scm
  
      def dockerArgs = '--user=root -v /tmp/comma_download_cache:/tmp/comma_download_cache';
      docker.build("openpilot-base:build-${env.GIT_COMMIT}", "-f Dockerfile.openpilot_base .").inside(dockerArgs) {
        timeout(time: 20, unit: 'MINUTES') {
          try {
            sh "git config --global --add safe.directory '*'"
            sh "git submodule update --init --recursive"
 
</s> remove           device(device_ip, "git checkout", readFile("selfdrive/test/setup_device_ci.sh"),)
 </s> add           device(device_ip, "git checkout", extra + "\n" + readFile("selfdrive/test/setup_device_ci.sh")) </s> remove     stage('git checkout') {
      checkout scm
    }

 </s> add  </s> remove def deviceStage(String stageName, String deviceType, def steps) {
 </s> add def deviceStage(String stageName, String deviceType, List env, def steps) { </s> remove           sh "scons --clean && scons --no-cache --random -j42"

          // car tests
          sh "INTERNAL_SEG_CNT=500 INTERNAL_SEG_LIST=selfdrive/car/tests/test_models_segs.txt FILEREADER_CACHE=1 \
 </s> add           sh label: "test multi-threaded build", script: "scons --no-cache --random -j42"
        }
      },
      'car tests': {
        pcStage("car tests") {
          sh "scons -j30"
          sh label: "test_models.py", script: "INTERNAL_SEG_CNT=250 INTERNAL_SEG_LIST=selfdrive/car/tests/test_models_segs.txt FILEREADER_CACHE=1 \
    def dockerArgs = '--user=root -v /tmp/comma_download_cache:/tmp/comma_download_cache -v /tmp/scons_cache:/tmp/scons_cache';
      }
  
      checkout scm
  
    def dockerArgs = '--user=root -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 {
            sh "git config --global --add safe.directory '*'"
            sh "git submodule update --init --recursive"
keep keep keep keep replace keep keep keep keep keep
 jenkins speedup (#29869)

* jenkins speedup

* cleanup 
Jenkinsfile