File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,22 @@ tasks.register("verifyVersions") {
229229 }
230230}
231231
232+ def generateUpgradeCompatibilityFile = tasks. register(" generateUpgradeCompatibilityFile" ) {
233+ def outputFile = project. layout. buildDirectory. file(" rolling-upgrade-compatible-${ VersionProperties.elasticsearch} .json" )
234+ def rollingUpgradeCompatibleVersions = buildParams. bwcVersions. wireCompatible - VersionProperties . elasticsearchVersion
235+ inputs. property(" rollingUpgradeCompatibleVersions" , rollingUpgradeCompatibleVersions)
236+ outputs. file(outputFile)
237+ doLast {
238+ def versionsString = rollingUpgradeCompatibleVersions. collect { " \" ${ it.toString()} \" " }. join(' , ' )
239+ outputFile. get(). asFile. write(""" {"rolling_upgrade_compatible_versions" : [${ versionsString} ]}""" )
240+ }
241+ }
242+
243+ def upgradeCompatibilityZip = tasks. register(" upgradeCompatibilityZip" , Zip ) {
244+ archiveFile. set(project. layout. buildDirectory. file(" rolling-upgrade-compatible-${ VersionProperties.elasticsearch} .zip" ))
245+ from(generateUpgradeCompatibilityFile)
246+ }
247+
232248// TODO: This flag existed as a mechanism to disable bwc tests during a backport. It is no
233249// longer used for that purpose, but instead a way to run only functional tests. We should
234250// rework the functionalTests task to be more explicit about which tasks it wants to run
@@ -483,6 +499,7 @@ tasks.register("buildReleaseArtifacts").configure {
483499 }
484500 .collect { GradleUtils . findByName(it. tasks, ' assemble' ) }
485501 .findAll { it != null }
502+ dependsOn upgradeCompatibilityZip
486503}
487504
488505tasks. register(" spotlessApply" ). configure {
You can’t perform that action at this time.
0 commit comments