Add build artifact containing json file of all wire compatible versions (#123740)
This commit is contained in:
parent
cc08d1d2a6
commit
e54037b7d0
17
build.gradle
17
build.gradle
|
@ -229,6 +229,22 @@ tasks.register("verifyVersions") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def generateUpgradeCompatibilityFile = tasks.register("generateUpgradeCompatibilityFile") {
|
||||||
|
def outputFile = project.layout.buildDirectory.file("rolling-upgrade-compatible-${VersionProperties.elasticsearch}.json")
|
||||||
|
def rollingUpgradeCompatibleVersions = buildParams.bwcVersions.wireCompatible - VersionProperties.elasticsearchVersion
|
||||||
|
inputs.property("rollingUpgradeCompatibleVersions", rollingUpgradeCompatibleVersions)
|
||||||
|
outputs.file(outputFile)
|
||||||
|
doLast {
|
||||||
|
def versionsString = rollingUpgradeCompatibleVersions.collect { "\"${it.toString()}\"" }.join(', ')
|
||||||
|
outputFile.get().asFile.write("""{"rolling_upgrade_compatible_versions" : [${versionsString}]}""")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def upgradeCompatibilityZip = tasks.register("upgradeCompatibilityZip", Zip) {
|
||||||
|
archiveFile.set(project.layout.buildDirectory.file("rolling-upgrade-compatible-${VersionProperties.elasticsearch}.zip"))
|
||||||
|
from(generateUpgradeCompatibilityFile)
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: This flag existed as a mechanism to disable bwc tests during a backport. It is no
|
// TODO: This flag existed as a mechanism to disable bwc tests during a backport. It is no
|
||||||
// longer used for that purpose, but instead a way to run only functional tests. We should
|
// longer used for that purpose, but instead a way to run only functional tests. We should
|
||||||
// rework the functionalTests task to be more explicit about which tasks it wants to run
|
// rework the functionalTests task to be more explicit about which tasks it wants to run
|
||||||
|
@ -483,6 +499,7 @@ tasks.register("buildReleaseArtifacts").configure {
|
||||||
}
|
}
|
||||||
.collect { GradleUtils.findByName(it.tasks, 'assemble') }
|
.collect { GradleUtils.findByName(it.tasks, 'assemble') }
|
||||||
.findAll { it != null }
|
.findAll { it != null }
|
||||||
|
dependsOn upgradeCompatibilityZip
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("spotlessApply").configure {
|
tasks.register("spotlessApply").configure {
|
||||||
|
|
Loading…
Reference in New Issue