Skip to content

Commit ec68d97

Browse files
committed
HSEARCH-4920 Do not check for source modifications in Elasticsearch upgrade job
1 parent bbaad99 commit ec68d97

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

ci/dependency-update/Jenkinsfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,36 @@ Map settings() {
1313
case 'orm6.2':
1414
return [
1515
updateProperties: ['version.org.hibernate.orm'],
16-
onlyRunTestDependingOn: ['hibernate-search-mapper-orm']
16+
onlyRunTestDependingOn: ['hibernate-search-mapper-orm'],
17+
requiresSourceModifications: true
1718
]
1819
case 'orm6.3':
1920
return [
2021
updateProperties: ['version.org.hibernate.orm'],
21-
onlyRunTestDependingOn: ['hibernate-search-mapper-orm']
22+
onlyRunTestDependingOn: ['hibernate-search-mapper-orm'],
23+
requiresSourceModifications: true
2224
]
2325
case 'lucene9':
2426
return [
2527
updateProperties: ['version.org.apache.lucene'],
2628
onlyRunTestDependingOn: ['hibernate-search-backend-lucene'],
29+
requiresSourceModifications: true
2730
]
2831
case 'lucene10':
2932
return [
3033
updateProperties: ['version.org.apache.lucene'],
3134
onlyRunTestDependingOn: ['hibernate-search-backend-lucene'],
35+
requiresSourceModifications: true
3236
]
3337
case 'elasticsearch-latest':
3438
return [
3539
// There are no properties to update in this case.
3640
updateProperties: [],
3741
onlyRunTestDependingOn: ['hibernate-search-backend-elasticsearch'],
3842
// We want to use the snapshot version of an image from the ES registry since that's where they are publishing their snapshots.
39-
additionalMavenArgs: '-Dtest.elasticsearch.run.elastic.image.name=docker.elastic.co/elasticsearch/elasticsearch -Dtest.elasticsearch.run.elastic.image.tag=master-SNAPSHOT'
43+
additionalMavenArgs: '-Dtest.elasticsearch.run.elastic.image.name=docker.elastic.co/elasticsearch/elasticsearch -Dtest.elasticsearch.run.elastic.image.tag=master-SNAPSHOT',
44+
// This job won't change the versions in the pom. We are passing the latest Elasticsearch version through an additional maven argument `-D`
45+
requiresSourceModifications: false
4046
]
4147
default:
4248
return [:]
@@ -161,7 +167,7 @@ pipeline {
161167
sh "ci/dependency-update/perform-update.sh ${env.DEPENDENCY_UPDATE_NAME} '${settings().updateProperties?.join(",") ?: ''}'"
162168
}
163169
script {
164-
if (0 != sh(script: "git diff origin/${BRANCH_NAME} | grep -q '.'", returnStatus: true)) {
170+
if (settings().requiresSourceModifications && 0 != sh(script: "git diff origin/${BRANCH_NAME} | grep -q '.'", returnStatus: true)) {
165171
error "This job does not seem to update any dependency; perhaps it is misconfigured? The source code has not been updated, neither by merging a WIP branch nor by updating version properties."
166172
}
167173
}

0 commit comments

Comments
 (0)