testing pipeline functuion
This commit is contained in:
		
							
								
								
									
										20
									
								
								vars/test.groovy
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								vars/test.groovy
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| def call(body) { | ||||
|     def config = [:] | ||||
|     body.resolveStrategy = Closure.DELEGATE_FIRST | ||||
|     body.delegate = config | ||||
|     body () | ||||
|  | ||||
|     def reposConfig = [:[:]] | ||||
|     config.reposConfig.each{repo -> | ||||
|         reposConfig = [ | ||||
|             gitBranch: repo.value.gitBranch, | ||||
|             gitRepo: repo.value.gitRepo, | ||||
|             gitCreds: repo.value.gitCreds | ||||
|         ] | ||||
|     } | ||||
|  | ||||
|     reposConfig.each{repo -> | ||||
|         echo "Map Element ${index} (${repo.key}): ${repo.value.gitRepo}" | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user