Updating the Ivy repository to point to real url for Releases (#602)

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
This commit is contained in:
Sarat Vemulapalli 2021-04-22 10:22:50 -07:00 committed by GitHub
parent b8f9469cc9
commit 9701b226d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ class DistributionDownloadFixture {
private static String urlPath(String version, OpenSearchDistribution.Platform platform) {
String fileType = ((platform == OpenSearchDistribution.Platform.LINUX ||
platform == OpenSearchDistribution.Platform.DARWIN)) ? "tar.gz" : "zip"
"/downloads/opensearch/opensearch-${version}-${platform}-x86_64.$fileType"
"/releases/core/opensearch/${version}/opensearch-${version}-${platform}-x86_64.$fileType"
}
private static byte[] filebytes(String urlPath) throws IOException {

View File

@ -156,7 +156,7 @@ public class DistributionDownloadPlugin implements Plugin<Project> {
repo.setName(name);
repo.setUrl(url);
repo.metadataSources(IvyArtifactRepository.MetadataSources::artifact);
repo.patternLayout(layout -> layout.artifact("/downloads/opensearch/[module]-[revision](-[classifier]).[ext]"));
repo.patternLayout(layout -> layout.artifact("/releases/core/opensearch/[revision]/[module]-[revision](-[classifier]).[ext]"));
});
project.getRepositories().exclusiveContent(exclusiveContentRepository -> {
exclusiveContentRepository.filter(config -> config.includeGroup(group));
@ -168,7 +168,7 @@ public class DistributionDownloadPlugin implements Plugin<Project> {
if (project.getRepositories().findByName(DOWNLOAD_REPO_NAME) != null) {
return;
}
addIvyRepo(project, DOWNLOAD_REPO_NAME, "https://artifacts-no-kpi.opensearch.org", FAKE_IVY_GROUP);
addIvyRepo(project, DOWNLOAD_REPO_NAME, "https://artifacts.opensearch.org", FAKE_IVY_GROUP);
addIvyRepo(project, SNAPSHOT_REPO_NAME, "https://snapshots-no-kpi.opensearch.org", FAKE_SNAPSHOT_IVY_GROUP);
}