diff options
author | Mikhail Shchatko <mikhail.shchatko@mongodb.com> | 2020-10-21 18:29:59 +0300 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-23 07:36:32 +0000 |
commit | de8c511301f174cb26e43be8d411a3858773281d (patch) | |
tree | be76c0f86b1cc9c74c797c286454646a6bb5490a | |
parent | a47cf88093c5ba92d78199487dc67f80285a5c24 (diff) | |
download | mongo-de8c511301f174cb26e43be8d411a3858773281d.tar.gz |
SERVER-51776 Map setup_multiversion_mongodb.py args to evergreen build variants
-rwxr-xr-x | buildscripts/setup_multiversion_mongodb.py | 24 | ||||
-rw-r--r-- | etc/setup_multiversion_mapping.yml | 291 |
2 files changed, 315 insertions, 0 deletions
diff --git a/buildscripts/setup_multiversion_mongodb.py b/buildscripts/setup_multiversion_mongodb.py index f8a57026bd9..1e647e229bf 100755 --- a/buildscripts/setup_multiversion_mongodb.py +++ b/buildscripts/setup_multiversion_mongodb.py @@ -19,6 +19,9 @@ import zipfile import requests import requests.exceptions +import yaml + +SETUP_MULTIVERSION_FILE = "etc/setup_multiversion_mapping.yml" def dump_stacks(_signal_num, _frame): # pylint: disable=unused-argument @@ -111,6 +114,27 @@ def download_file(url, file_name, download_retries=5): raise Exception("Unknown download problem for {} to file {}".format(url, file_name)) +def get_buildvariant_name(edition, platform, architecture, version): + """Return Evergreen buildvariant name.""" + + with open(SETUP_MULTIVERSION_FILE) as file_handle: + config_yaml = yaml.safe_load(file_handle) + + buildvariant_name = "" + for buildvariant in config_yaml.get("evergreen_buildvariants", []): + if (buildvariant.get("edition", "") == edition + and buildvariant.get("platform", "") == platform + and buildvariant.get("architecture", "") == architecture): + versions = buildvariant.get("versions", []) + if version in versions: + buildvariant_name = buildvariant.get("name", "") + break + elif not versions: + buildvariant_name = buildvariant.get("name", "") + + return buildvariant_name + + class MultiVersionDownloader(object): # pylint: disable=too-many-instance-attributes """Class to support multiversion downloads.""" diff --git a/etc/setup_multiversion_mapping.yml b/etc/setup_multiversion_mapping.yml new file mode 100644 index 00000000000..6e69f7dbeeb --- /dev/null +++ b/etc/setup_multiversion_mapping.yml @@ -0,0 +1,291 @@ +evergreen_buildvariants: + +- name: ubuntu1604 + edition: targeted + platform: ubuntu1604 + architecture: x86_64 + +- name: enterprise-ubuntu1604-64 + edition: enterprise + platform: ubuntu1604 + architecture: x86_64 + +- name: enterprise-ubuntu1604-arm64 + edition: enterprise + platform: ubuntu1604 + architecture: aarch64 + +- name: enterprise-ubuntu1604-arm64 + edition: enterprise + platform: ubuntu1604 + architecture: arm64 + versions: ["3.4", "3.6", "4.0"] + +- name: ubuntu1804 + edition: targeted + platform: ubuntu1804 + architecture: x86_64 + +- name: enterprise-ubuntu1804-64 + edition: enterprise + platform: ubuntu1804 + architecture: x86_64 + +- name: ubuntu1804-arm64 + edition: targeted + platform: ubuntu1804 + architecture: aarch64 + +- name: enterprise-ubuntu1804-arm64 + edition: enterprise + platform: ubuntu1804 + architecture: aarch64 + +- name: enterprise-ubuntu1804-ppc64le + edition: enterprise + platform: ubuntu1804 + architecture: ppc64le + +- name: ubuntu1804-s390x + edition: targeted + platform: ubuntu1804 + architecture: s390x + +- name: enterprise-ubuntu1804-s390x + edition: enterprise + platform: ubuntu1804 + architecture: s390x + +- name: ubuntu2004 + edition: targeted + platform: ubuntu2004 + architecture: x86_64 + +- name: enterprise-ubuntu2004-64 + edition: enterprise + platform: ubuntu2004 + architecture: x86_64 + +- name: ubuntu2004-arm64 + edition: targeted + platform: ubuntu2004 + architecture: aarch64 + +- name: enterprise-ubuntu2004-arm64 + edition: enterprise + platform: ubuntu2004 + architecture: aarch64 + +- name: amazon + edition: targeted + platform: amazon + architecture: x86_64 + +- name: enterprise-linux-64-amazon-ami + edition: enterprise + platform: amazon + architecture: x86_64 + +- name: amazon2 + edition: targeted + platform: amazon2 + architecture: x86_64 + +- name: enterprise-amazon2 + edition: enterprise + platform: amazon2 + architecture: x86_64 + +- name: rhel62 + edition: targeted + platform: rhel62 + architecture: x86_64 + +- name: enterprise-rhel-62-64-bit + edition: enterprise + platform: rhel62 + architecture: x86_64 + +- name: rhel70 + edition: targeted + platform: rhel70 + architecture: x86_64 + +- name: enterprise-rhel-70-64-bit + edition: enterprise + platform: rhel70 + architecture: x86_64 + +- name: rhel80 + edition: targeted + platform: rhel80 + architecture: x86_64 + +- name: enterprise-rhel-80-64-bit + edition: enterprise + platform: rhel80 + architecture: x86_64 + +- name: rhel-82-arm64 + edition: targeted + platform: rhel82 + architecture: arm64 + +- name: enterprise-rhel-82-arm64 + edition: enterprise + platform: rhel82 + architecture: arm64 + +- name: enterprise-rhel-71-ppc64le + edition: enterprise + platform: rhel71 + architecture: ppc64le + +- name: enterprise-rhel-81-ppc64le + edition: enterprise + platform: rhel81 + architecture: ppc64le + +- name: rhel-67-s390x + edition: targeted + platform: rhel67 + architecture: s390x + +- name: enterprise-rhel-67-s390x + edition: enterprise + platform: rhel67 + architecture: s390x + +- name: rhel-72-s390x + edition: targeted + platform: rhel72 + architecture: s390x + +- name: enterprise-rhel-72-s390x + edition: enterprise + platform: rhel72 + architecture: s390x + +- name: suse12 + edition: targeted + platform: suse12 + architecture: x86_64 + +- name: enterprise-suse12-64 + edition: enterprise + platform: suse12 + architecture: x86_64 + +- name: suse12-s390x + edition: targeted + platform: suse12 + architecture: s390x + +- name: enterprise-suse12-s390x + edition: enterprise + platform: suse12 + architecture: s390x + +- name: suse15 + edition: targeted + platform: suse15 + architecture: x86_64 + +- name: enterprise-suse15-64 + edition: enterprise + platform: suse15 + architecture: x86_64 + +- name: debian92 + edition: targeted + platform: debian92 + architecture: x86_64 + +- name: enterprise-debian92-64 + edition: enterprise + platform: debian92 + architecture: x86_64 + +- name: debian10 + edition: targeted + platform: debian10 + architecture: x86_64 + +- name: enterprise-debian10-64 + edition: enterprise + platform: debian10 + architecture: x86_64 + +- name: windows + edition: targeted + platform: windows + architecture: x86_64 + +- name: windows-64-2k8-ssl + edition: targeted + platform: windows_x86_64-2012plus + architecture: x86_64 + versions: ["4.2"] + +- name: windows-64-2k8-ssl + edition: targeted + platform: windows_x86_64-2008plus-ssl + architecture: x86_64 + versions: ["3.4", "3.6", "4.0"] + +- name: enterprise-windows + edition: enterprise + platform: windows + architecture: x86_64 + +- name: enterprise-windows-64-2k8 + edition: enterprise + platform: windows + architecture: x86_64 + versions: ["3.6", "4.0", "4.2"] + +- name: enterprise-windows-64 + edition: enterprise + platform: windows + architecture: x86_64 + versions: ["3.4"] + +- name: macos + edition: targeted + platform: osx + architecture: x86_64 + +- name: osx-1010 + edition: targeted + platform: osx + architecture: x86_64 + versions: ["4.0"] + +- name: osx-1010-ssl + edition: targeted + platform: osx + architecture: x86_64 + versions: ["3.6"] + +- name: osx-108-ssl + edition: targeted + platform: osx + architecture: x86_64 + versions: ["3.4"] + +- name: enterprise-macos + edition: enterprise + platform: osx + architecture: x86_64 + +- name: enterprise-osx-1010 + edition: enterprise + platform: osx + architecture: x86_64 + versions: ["3.6", "4.0"] + +- name: enterprise-osx-108 + edition: enterprise + platform: osx + architecture: x86_64 + versions: ["3.4"] |