mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 22:45:04 +00:00
* Wire local unreleased bwc versions more efficient for tests (#62473) For testing against the local distribution we already avoid the packaging/unpackaging cycle of es distributions when setting up test clusters. This PR adopts the usage of the expanded created distributions for unreleased bwc versions (versions that are checkout from a branch and build from source in the :distribution:bwc:minor / :distribution:bwc:bugfix). This makes the setup of bwc based cross version tests a bit faster by avoiding the unpackaging overhead. We still assemble both in the bwcBuild tasks atm which will be addressed in a later issue. This reworks the :distribution:bwc project: - Convert all the custom logic from build script logic (groovy) into gradle binary plugins (java) - Tried to make the bwc setup logic a bit more readable - Add basic functional test coverage for the bwc logic this PR tweaked. - Extracted a general internal BWC Git plugin out of the bwc setup plugin to improve maintenance and testability - Changed the InternalDistributionPlugin to resolve the extracted distro instead on relying on unpacking the distribution archive * Fix java8 incompatibility * Fix extension calculation for 6.8.* distribution
39 lines
1.6 KiB
Groovy
39 lines
1.6 KiB
Groovy
/*
|
|
* Licensed to Elasticsearch under one or more contributor
|
|
* license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright
|
|
* ownership. Elasticsearch licenses this file to you under
|
|
* the Apache License, Version 2.0 (the "License"); you may
|
|
* not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing,
|
|
* software distributed under the License is distributed on an
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
* KIND, either express or implied. See the License for the
|
|
* specific language governing permissions and limitations
|
|
* under the License.
|
|
*/
|
|
|
|
apply plugin:"elasticsearch.internal-distribution-bwc-setup"
|
|
|
|
import org.elasticsearch.gradle.Version
|
|
import org.elasticsearch.gradle.info.BuildParams
|
|
|
|
|
|
BuildParams.getBwcVersions().forPreviousUnreleased { unreleasedVersion ->
|
|
project(unreleasedVersion.gradleProjectPath) {
|
|
Version currentVersion = Version.fromString(version)
|
|
TaskProvider<Task> resolveAllBwcDepsTaskProvider = bwcSetup.bwcTask("resolveAllBwcDependencies") {
|
|
t -> t.args("resolveAllDependencies")
|
|
}
|
|
if (currentVersion.getMinor() == 0 && currentVersion.getRevision() == 0) {
|
|
// We only want to resolve dependencies for live versions of master, without cascading this to older versions
|
|
tasks.named("resolveAllDependencies").configure {
|
|
dependsOn(resolveAllBwcDepsTaskProvider)
|
|
}
|
|
}
|
|
}
|
|
} |