summaryrefslogtreecommitdiff
path: root/buildscripts/setup_multiversion_mongodb.py
diff options
context:
space:
mode:
authorRobert Guo <robert.guo@10gen.com>2020-09-29 02:14:33 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-29 13:01:35 +0000
commitf1cbeb3ebf1e112339a3c8da47bd5a553b80b23d (patch)
tree777c5014fcf8ece597e3bf6fa75805e5419157b0 /buildscripts/setup_multiversion_mongodb.py
parentebc57bb3708a807cb79cf905be1fbfc6430f6163 (diff)
downloadmongo-f1cbeb3ebf1e112339a3c8da47bd5a553b80b23d.tar.gz
SERVER-51054 construct multiversion download URLs manually for 4.7
Diffstat (limited to 'buildscripts/setup_multiversion_mongodb.py')
-rwxr-xr-xbuildscripts/setup_multiversion_mongodb.py36
1 files changed, 34 insertions, 2 deletions
diff --git a/buildscripts/setup_multiversion_mongodb.py b/buildscripts/setup_multiversion_mongodb.py
index bad860184bd..e933b24fe7b 100755
--- a/buildscripts/setup_multiversion_mongodb.py
+++ b/buildscripts/setup_multiversion_mongodb.py
@@ -230,8 +230,40 @@ class MultiVersionDownloader(object): # pylint: disable=too-many-instance-attri
continue
urls.append((ver, generic_url))
if not urls:
- raise Exception(
- "No fall-back generic link available or version {}.".format(version))
+ if version != "4.7":
+ raise Exception(
+ "No fall-back generic link available or version {}.".format(version))
+
+ print("manually constructing URL for 4.7 releases;"
+ "please note that only the latest release is available")
+
+ url_template = "https://downloads.mongodb.com/{bucket}/mongodb-{os_family}-{arch}-enterprise-{platform}-4.7.tgz"
+
+ if self.platform == "windows":
+ os_family = self.platform
+ bucket = self.platform
+ elif self.platform == "osx":
+ os_family = "macos"
+ bucket = self.platform
+ else:
+ os_family = "linux"
+ bucket = "linux"
+
+ if self.platform == "osx" or self.platform == "windows":
+ # macOS and Windows URLs don't have the platform portion.
+ platform = ""
+ elif self.platform == "amazon":
+ # The community version and the enterprise version have different platform names.
+ platform = "amzn64"
+ else:
+ platform = self.platform
+
+ url = url_template.format(bucket=bucket, os_family=os_family,
+ arch=self.architecture, platform=platform)
+
+ # URLs with missing sections lead to double dashes.
+ url = url.replace("--", "-")
+ urls.append(("4.7", url))
else:
print("Falling back to generic architecture.")