Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup BWC projects for versions bigger than 7.12 #79173

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,16 @@ class InternalDistributionBwcSetupPluginFuncTest extends AbstractGitAwareGradleF
"""
when:
def result = gradleRunner(":distribution:bwc:${bwcProject}:buildBwcDarwinTar",
":distribution:bwc:${bwcProject}:buildBwcOssDarwinTar",
":distribution:bwc:${bwcProject}:buildBwcDarwinTar",
"-DtestRemoteRepo=" + remoteGitRepo,
"-Dbwc.remote=origin",
"-Dbwc.dist.version=${bwcDistVersion}-SNAPSHOT")
.build()
then:
result.task(":distribution:bwc:${bwcProject}:buildBwcDarwinTar").outcome == TaskOutcome.SUCCESS
result.task(":distribution:bwc:${bwcProject}:buildBwcOssDarwinTar").outcome == TaskOutcome.SUCCESS

and: "assemble task triggered"
assertOutputContains(result.output, "[$bwcDistVersion] > Task :distribution:archives:darwin-tar:${expectedAssembleTaskName}")
assertOutputContains(result.output, "[$bwcDistVersion] > Task :distribution:archives:oss-darwin-tar:${expectedAssembleTaskName}")

where:
bwcDistVersion | bwcProject | expectedAssembleTaskName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,22 @@ private void registerDistributionArchiveArtifact(Project bwcProject, Distributio

private static List<DistributionProject> resolveArchiveProjects(File checkoutDir, Version bwcVersion) {
List<String> projects = new ArrayList<>();
// All active BWC branches publish default and oss variants of rpm and deb packages
projects.addAll(asList("deb", "rpm", "oss-deb", "oss-rpm"));

if (bwcVersion.onOrAfter("7.0.0")) { // starting with 7.0 we bundle a jdk which means we have platform-specific archives
projects.addAll(asList("oss-windows-zip", "windows-zip", "oss-darwin-tar", "darwin-tar", "oss-linux-tar", "linux-tar"));

// We support aarch64 for linux and mac starting from 7.12
if (bwcVersion.onOrAfter("7.12.0")) {
projects.addAll(asList("oss-darwin-aarch64-tar", "oss-linux-aarch64-tar", "darwin-aarch64-tar", "linux-aarch64-tar"));
if (bwcVersion.onOrAfter("7.13.0")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd only ask that we include a comment explaining that this is due to oss distro removal.

projects.addAll(asList("deb", "rpm"));
projects.addAll(asList("windows-zip", "darwin-tar", "linux-tar"));
projects.addAll(asList("darwin-aarch64-tar", "linux-aarch64-tar"));
} else {
projects.addAll(asList("deb", "rpm", "oss-deb", "oss-rpm"));
if (bwcVersion.onOrAfter("7.0.0")) { // starting with 7.0 we bundle a jdk which means we have platform-specific archives
projects.addAll(asList("oss-windows-zip", "windows-zip", "oss-darwin-tar", "darwin-tar", "oss-linux-tar", "linux-tar"));

// We support aarch64 for linux and mac starting from 7.12
if (bwcVersion.onOrAfter("7.12.0")) {
projects.addAll(asList("oss-darwin-aarch64-tar", "oss-linux-aarch64-tar", "darwin-aarch64-tar", "linux-aarch64-tar"));
}
} else { // prior to 7.0 we published only a single zip and tar archives for oss and default distributions
projects.addAll(asList("oss-zip", "zip", "tar", "oss-tar"));
}
} else { // prior to 7.0 we published only a single zip and tar archives for oss and default distributions
projects.addAll(asList("oss-zip", "zip", "tar", "oss-tar"));
}

return projects.stream().map(name -> {
Expand Down