From d0d3f33d5265bd14e31a5f77c409047d597d4341 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Mon, 17 Jul 2023 18:15:46 +0000 Subject: [PATCH] Priorize snapshot builds in distribution downloader In the Security plugin's BWC tests there have been an issue with stale artifacts, when troubleshooting we noticed that a release candidate for OpenSearch 3.0.0 was being picked up in priority before the latest snapshot build. This was causing build failures preventing our tests from running. - Related https://github.com/opensearch-project/security/issues/3020 Signed-off-by: Peter Nied --- .../gradle/DistributionDownloadPlugin.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/buildSrc/src/main/java/org/opensearch/gradle/DistributionDownloadPlugin.java b/buildSrc/src/main/java/org/opensearch/gradle/DistributionDownloadPlugin.java index c2ca92c3ef5fc..30d02e0e0bf00 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/DistributionDownloadPlugin.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/DistributionDownloadPlugin.java @@ -181,30 +181,30 @@ private static void setupDownloadServiceRepo(Project project) { String distributionDownloadType = customDistributionDownloadType != null && customDistributionDownloadType.toString().equals("bundle") ? "bundle" : "min"; if (customDistributionUrl != null) { - addIvyRepo(project, DOWNLOAD_REPO_NAME, customDistributionUrl.toString(), FAKE_IVY_GROUP, ""); addIvyRepo(project, SNAPSHOT_REPO_NAME, customDistributionUrl.toString(), FAKE_SNAPSHOT_IVY_GROUP, ""); + addIvyRepo(project, DOWNLOAD_REPO_NAME, customDistributionUrl.toString(), FAKE_IVY_GROUP, ""); return; } switch (distributionDownloadType) { case "bundle": - addIvyRepo(project, DOWNLOAD_REPO_NAME, "https://ci.opensearch.org", FAKE_IVY_GROUP, BUNDLE_PATTERN_LAYOUT); addIvyRepo(project, SNAPSHOT_REPO_NAME, "https://ci.opensearch.org", FAKE_SNAPSHOT_IVY_GROUP, BUNDLE_PATTERN_LAYOUT); + addIvyRepo(project, DOWNLOAD_REPO_NAME, "https://ci.opensearch.org", FAKE_IVY_GROUP, BUNDLE_PATTERN_LAYOUT); break; case "min": addIvyRepo( project, - DOWNLOAD_REPO_NAME, + SNAPSHOT_REPO_NAME, "https://artifacts.opensearch.org", - FAKE_IVY_GROUP, - "/releases" + RELEASE_PATTERN_LAYOUT, - "/release-candidates" + RELEASE_PATTERN_LAYOUT + FAKE_SNAPSHOT_IVY_GROUP, + SNAPSHOT_PATTERN_LAYOUT ); addIvyRepo( project, - SNAPSHOT_REPO_NAME, + DOWNLOAD_REPO_NAME, "https://artifacts.opensearch.org", - FAKE_SNAPSHOT_IVY_GROUP, - SNAPSHOT_PATTERN_LAYOUT + FAKE_IVY_GROUP, + "/releases" + RELEASE_PATTERN_LAYOUT, + "/release-candidates" + RELEASE_PATTERN_LAYOUT ); break; default: