Signed-off-by: Marc Handalian <handalm@amazon.com>
This commit is contained in:
parent
1f7df7adac
commit
3c563fedd9
|
@ -234,7 +234,16 @@ public class DistributionDownloadPlugin implements Plugin<Project> {
|
|||
extension = distribution.getPlatform() == Platform.WINDOWS ? "zip" : "tar.gz";
|
||||
|
||||
if (distroVersion.onOrAfter("1.0.0")) {
|
||||
classifier = ":" + distribution.getPlatform() + "-x64";
|
||||
switch (distribution.getArchitecture()) {
|
||||
case ARM64:
|
||||
classifier = ":" + distribution.getPlatform() + "-arm64";
|
||||
break;
|
||||
case X64:
|
||||
classifier = ":" + distribution.getPlatform() + "-x64";
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("Unsupported architecture: " + distribution.getArchitecture());
|
||||
}
|
||||
} else if (distroVersion.onOrAfter("7.0.0")) {
|
||||
classifier = ":" + distribution.getPlatform() + "-x86_64";
|
||||
} else {
|
||||
|
|
|
@ -142,15 +142,25 @@ public class DistributionDownloadPluginTests extends GradleUnitTestCase {
|
|||
public void testLocalCurrentVersionArchives() {
|
||||
for (Platform platform : Platform.values()) {
|
||||
for (boolean bundledJdk : new boolean[] { true, false }) {
|
||||
// create a new project in each iteration, so that we know we are resolving the only additional project being created
|
||||
Project project = createProject(BWC_MINOR, true);
|
||||
String projectName = projectName(platform.toString(), bundledJdk);
|
||||
projectName += (platform == Platform.WINDOWS ? "-zip" : "-tar");
|
||||
Project archiveProject = ProjectBuilder.builder().withParent(archivesProject).withName(projectName).build();
|
||||
archiveProject.getConfigurations().create("default");
|
||||
archiveProject.getArtifacts().add("default", new File("doesnotmatter"));
|
||||
createDistro(project, "distro", VersionProperties.getOpenSearch(), Type.ARCHIVE, platform, bundledJdk);
|
||||
checkPlugin(project);
|
||||
for (Architecture architecture : Architecture.values()) {
|
||||
// create a new project in each iteration, so that we know we are resolving the only additional project being created
|
||||
Project project = createProject(BWC_MINOR, true);
|
||||
String projectName = projectName(platform.toString(), bundledJdk);
|
||||
projectName += (platform == Platform.WINDOWS ? "-zip" : "-tar");
|
||||
Project archiveProject = ProjectBuilder.builder().withParent(archivesProject).withName(projectName).build();
|
||||
archiveProject.getConfigurations().create("default");
|
||||
archiveProject.getArtifacts().add("default", new File("doesnotmatter"));
|
||||
final OpenSearchDistribution distro = createDistro(
|
||||
project,
|
||||
"distro",
|
||||
VersionProperties.getOpenSearch(),
|
||||
Type.ARCHIVE,
|
||||
platform,
|
||||
bundledJdk
|
||||
);
|
||||
distro.setArchitecture(architecture);
|
||||
checkPlugin(project);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue