| 
									
										
										
										
											2022-01-31 16:08:57 -06:00
										 |  |  | def p = [:] | 
					
						
							|  |  |  | node { | 
					
						
							| 
									
										
										
										
											2023-03-30 11:40:56 -05:00
										 |  |  | 		checkout scm | 
					
						
							|  |  |  | 		p = readProperties interpolate: true, file: 'ci/pipeline.properties' | 
					
						
							| 
									
										
										
										
											2022-01-31 16:08:57 -06:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-15 16:14:44 -05:00
										 |  |  | pipeline { | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 	agent none | 
					
						
							| 
									
										
										
										
											2019-05-15 16:14:44 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 	triggers { | 
					
						
							|  |  |  | 		pollSCM 'H/10 * * * *' | 
					
						
							| 
									
										
										
										
											2022-03-24 09:26:33 +01:00
										 |  |  | 		upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS) | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2019-05-15 16:14:44 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 	options { | 
					
						
							|  |  |  | 		disableConcurrentBuilds() | 
					
						
							|  |  |  | 		buildDiscarder(logRotator(numToKeepStr: '14')) | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2019-05-15 16:14:44 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 	stages { | 
					
						
							| 
									
										
										
										
											2023-03-30 11:40:56 -05:00
										 |  |  | 		stage("test: baseline (main)") { | 
					
						
							| 
									
										
										
										
											2019-11-13 08:29:51 -06:00
										 |  |  | 			when { | 
					
						
							| 
									
										
										
										
											2022-03-24 09:26:33 +01:00
										 |  |  | 				beforeAgent(true) | 
					
						
							| 
									
										
										
										
											2019-11-13 08:29:51 -06:00
										 |  |  | 				anyOf { | 
					
						
							| 
									
										
										
										
											2022-03-24 09:26:33 +01:00
										 |  |  | 					branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP") | 
					
						
							| 
									
										
										
										
											2019-11-13 08:29:51 -06:00
										 |  |  | 					not { triggeredBy 'UpstreamCause' } | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			agent { | 
					
						
							| 
									
										
										
										
											2020-12-15 11:09:24 -06:00
										 |  |  | 				label 'data' | 
					
						
							| 
									
										
										
										
											2019-11-13 08:29:51 -06:00
										 |  |  | 			} | 
					
						
							|  |  |  | 			options { timeout(time: 30, unit: 'MINUTES') } | 
					
						
							| 
									
										
										
										
											2020-12-15 11:10:41 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			environment { | 
					
						
							| 
									
										
										
										
											2022-07-18 09:19:36 +02:00
										 |  |  | 				ARTIFACTORY = credentials("${p['artifactory.credentials']}") | 
					
						
							| 
									
										
										
										
											2023-09-15 14:46:26 -05:00
										 |  |  | 				DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") | 
					
						
							| 
									
										
										
										
											2020-12-15 11:10:41 -06:00
										 |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-13 08:29:51 -06:00
										 |  |  | 			steps { | 
					
						
							| 
									
										
										
										
											2020-12-15 11:09:24 -06:00
										 |  |  | 				script { | 
					
						
							| 
									
										
										
										
											2024-06-20 11:18:11 +02:00
										 |  |  | 					docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { | 
					
						
							|  |  |  | 						docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { | 
					
						
							|  |  |  | 							sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh" | 
					
						
							|  |  |  | 							sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh" | 
					
						
							|  |  |  | 						} | 
					
						
							| 
									
										
										
										
											2023-03-30 11:40:56 -05:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		stage("Test other configurations") { | 
					
						
							|  |  |  | 			when { | 
					
						
							|  |  |  | 				beforeAgent(true) | 
					
						
							|  |  |  | 				allOf { | 
					
						
							|  |  |  | 					branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP") | 
					
						
							|  |  |  | 					not { triggeredBy 'UpstreamCause' } | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			parallel { | 
					
						
							|  |  |  | 				stage("test: baseline (next)") { | 
					
						
							|  |  |  | 					agent { | 
					
						
							|  |  |  | 						label 'data' | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 					options { timeout(time: 30, unit: 'MINUTES') } | 
					
						
							|  |  |  | 					environment { | 
					
						
							|  |  |  | 						ARTIFACTORY = credentials("${p['artifactory.credentials']}") | 
					
						
							| 
									
										
										
										
											2023-09-15 14:46:26 -05:00
										 |  |  | 						DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") | 
					
						
							| 
									
										
										
										
											2023-03-30 11:40:56 -05:00
										 |  |  | 					} | 
					
						
							|  |  |  | 					steps { | 
					
						
							|  |  |  | 						script { | 
					
						
							| 
									
										
										
										
											2024-06-20 11:18:11 +02:00
										 |  |  | 							docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { | 
					
						
							|  |  |  | 								docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { | 
					
						
							|  |  |  | 									sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh" | 
					
						
							|  |  |  | 									sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh" | 
					
						
							|  |  |  | 								} | 
					
						
							| 
									
										
										
										
											2023-03-30 11:40:56 -05:00
										 |  |  | 							} | 
					
						
							| 
									
										
										
										
											2020-12-15 11:09:24 -06:00
										 |  |  | 						} | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2019-11-13 08:29:51 -06:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 		stage('Release to artifactory') { | 
					
						
							|  |  |  | 			when { | 
					
						
							| 
									
										
										
										
											2022-03-24 09:26:33 +01:00
										 |  |  | 				beforeAgent(true) | 
					
						
							| 
									
										
										
										
											2019-07-19 11:59:52 -05:00
										 |  |  | 				anyOf { | 
					
						
							| 
									
										
										
										
											2022-03-24 09:26:33 +01:00
										 |  |  | 					branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP") | 
					
						
							| 
									
										
										
										
											2019-07-19 11:59:52 -05:00
										 |  |  | 					not { triggeredBy 'UpstreamCause' } | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 			} | 
					
						
							|  |  |  | 			agent { | 
					
						
							| 
									
										
										
										
											2020-12-15 11:09:24 -06:00
										 |  |  | 				label 'data' | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 			} | 
					
						
							|  |  |  | 			options { timeout(time: 20, unit: 'MINUTES') } | 
					
						
							|  |  |  | 			environment { | 
					
						
							| 
									
										
										
										
											2022-07-18 09:19:36 +02:00
										 |  |  | 				ARTIFACTORY = credentials("${p['artifactory.credentials']}") | 
					
						
							| 
									
										
										
										
											2023-09-15 14:46:26 -05:00
										 |  |  | 				DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 			} | 
					
						
							|  |  |  | 			steps { | 
					
						
							| 
									
										
										
										
											2020-12-15 11:09:24 -06:00
										 |  |  | 				script { | 
					
						
							| 
									
										
										
										
											2024-06-20 11:18:11 +02:00
										 |  |  | 					docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) { | 
					
						
							| 
									
										
										
										
											2024-10-09 09:02:07 +02:00
										 |  |  | 						docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { | 
					
						
							| 
									
										
										
										
											2024-06-20 11:18:11 +02:00
										 |  |  | 								sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + | 
					
						
							| 
									
										
										
										
											2024-10-09 09:02:07 +02:00
										 |  |  | 									"./mvnw -s settings.xml -Pci,artifactory " + | 
					
						
							|  |  |  | 									"-Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root " + | 
					
						
							| 
									
										
										
										
											2024-06-20 11:18:11 +02:00
										 |  |  | 									"-Dartifactory.server=${p['artifactory.url']} " + | 
					
						
							|  |  |  | 									"-Dartifactory.username=${ARTIFACTORY_USR} " + | 
					
						
							|  |  |  | 									"-Dartifactory.password=${ARTIFACTORY_PSW} " + | 
					
						
							|  |  |  | 									"-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " + | 
					
						
							|  |  |  | 									"-Dartifactory.build-name=spring-data-elasticsearch " + | 
					
						
							|  |  |  | 									"-Dartifactory.build-number=spring-data-elasticsearch-${BRANCH_NAME}-build-${BUILD_NUMBER} " + | 
					
						
							| 
									
										
										
										
											2024-10-09 09:02:07 +02:00
										 |  |  | 									"-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch " + | 
					
						
							| 
									
										
										
										
											2024-06-20 11:18:11 +02:00
										 |  |  | 									"-Dmaven.test.skip=true clean deploy -U -B" | 
					
						
							|  |  |  | 						} | 
					
						
							| 
									
										
										
										
											2020-12-15 11:09:24 -06:00
										 |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2019-05-15 16:14:44 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-03 12:41:31 -05:00
										 |  |  | 	post { | 
					
						
							|  |  |  | 		changed { | 
					
						
							|  |  |  | 			script { | 
					
						
							|  |  |  | 				emailext( | 
					
						
							|  |  |  | 						subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}", | 
					
						
							|  |  |  | 						mimeType: 'text/html', | 
					
						
							|  |  |  | 						recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']], | 
					
						
							|  |  |  | 						body: "<a href=\"${env.BUILD_URL}\">${currentBuild.fullDisplayName} is reported as ${currentBuild.currentResult}</a>") | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2019-05-15 16:14:44 -05:00
										 |  |  | } |