Don't do BWC packaing tests if disabled (#39397)

Packaging tests did not honor bwc tests being off.
This was also the reason for which we were building  the BWC versinons
even if the tests are off, so this closes #35347.
This commit is contained in:
Alpar Torok 2019-02-27 09:16:58 +02:00
parent d16edf0462
commit d955375e9c

View File

@ -191,7 +191,9 @@ class VagrantTestPlugin implements Plugin<Project> {
dependencies.add(project.dependencies.project(path: ":distribution:${it}", configuration: 'default'))
}
if (project.ext.bwc_tests_enabled) {
// The version of elasticsearch that we upgrade *from*
// we only add them as dependencies if the bwc tests are enabled, so we don't trigger builds otherwise
VersionCollection.UnreleasedVersionInfo unreleasedInfo = project.bwcVersions.unreleasedInfo(upgradeFromVersion)
if (unreleasedInfo != null) {
// handle snapshots pointing to bwc build
@ -212,6 +214,10 @@ class VagrantTestPlugin implements Plugin<Project> {
}
}
}
} else {
// Upgrade tests will go from current to current when the BWC tests are disabled to skip real BWC tests.
upgradeFromVersion = Version.fromString(project.version)
}
for (Object dependency : dependencies) {
project.dependencies.add(PACKAGING_CONFIGURATION, dependency)