Added error handling for git config
This commit is contained in:
		
							parent
							
								
									9c8cbb9e63
								
							
						
					
					
						commit
						0e28922491
					
				| @ -44,8 +44,9 @@ def withGiteaCreds(String credentialsId, String gitToolName, Closure body) { | |||||||
|       gitToolName: gitToolName |       gitToolName: gitToolName | ||||||
|     ) |     ) | ||||||
|   ]) { |   ]) { | ||||||
|     sh "git config user.name ${env.GIT_USERNAME}" |     errorMessage = "Unable to set git config" | ||||||
|     sh "git config user.email admin@dipal.ru" |     sh "git config user.name ${env.GIT_USERNAME} || echo $errorMessage" | ||||||
|  |     sh "git config user.email admin@dipal.ru || echo $errorMessage" | ||||||
|     body() |     body() | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user