| 
						
						
						
					 | 
					 | 
					@ -1,3 +1,15 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					def retryWithDelay(int maxRetries, int delay, Closure body) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  for (int i = 0; i < maxRetries; i++) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    try { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      body() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      return | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    } catch (Exception e) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      sleep(delay) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  throw Exception("Failed after ${maxRetries} retries") | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def device(String ip, String step_label, String cmd) { | 
					 | 
					 | 
					 | 
					def device(String ip, String step_label, String cmd) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  withCredentials([file(credentialsId: 'id_rsa', variable: 'key_file')]) { | 
					 | 
					 | 
					 | 
					  withCredentials([file(credentialsId: 'id_rsa', variable: 'key_file')]) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    def ssh_cmd = """ | 
					 | 
					 | 
					 | 
					    def ssh_cmd = """ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -92,18 +104,20 @@ def pcStage(String stageName, Closure body) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    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 { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          sh "git config --global --add safe.directory '*'" | 
					 | 
					 | 
					 | 
					          retryWithDelay (3, 15) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          sh "git submodule update --init --recursive" | 
					 | 
					 | 
					 | 
					            sh "git config --global --add safe.directory '*'" | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          sh "git lfs pull" | 
					 | 
					 | 
					 | 
					            sh "git submodule update --init --recursive" | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            sh "git lfs pull" | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					          } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          body() | 
					 | 
					 | 
					 | 
					          body() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } finally { | 
					 | 
					 | 
					 | 
					        } finally { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          sh "rm -rf ${env.WORKSPACE}/* || true" | 
					 | 
					 | 
					 | 
					            sh "rm -rf ${env.WORKSPACE}/* || true" | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          sh "rm -rf .* || true" | 
					 | 
					 | 
					 | 
					            sh "rm -rf .* || true" | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					          } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      } | 
					 | 
					 | 
					 | 
					      } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def setupCredentials() { | 
					 | 
					 | 
					 | 
					def setupCredentials() { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |