From 9a35007bac85d0ad43a45d9e8e5ebc1d2bab1737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Thu, 10 Oct 2024 08:21:48 +0200 Subject: [PATCH] ci: allow to manually select the Fedora version for Tier 1 Versions that has branched out from Rawhide but are still not released still have many changes that breaks the CI. As we want the CI to be more stable for Tier 1, which runs for every MR, do not make the switch as soon as Rawhide has branched, but when we choose so. --- .gitlab-ci.yml | 10 +++++----- .gitlab-ci/config.yml | 2 +- .gitlab-ci/distros-info.yml | 3 ++- .gitlab-ci/distros_support.py | 15 +++++++++++++-- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e48e4373a..396cbd3fe7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,11 +60,11 @@ variables: # # This is done by running `ci-fairy generate-template` and possibly bumping # ".default_tag". - ALPINE_TAG: 'tag-4b249f1fd7fc' - CENTOS_TAG: 'tag-58487201dcba' - DEBIAN_TAG: 'tag-288e1002f3ac' - FEDORA_TAG: 'tag-58487201dcba' - UBUNTU_TAG: 'tag-288e1002f3ac' + ALPINE_TAG: 'tag-0959c37ef19b' + CENTOS_TAG: 'tag-70ac400f2325' + DEBIAN_TAG: 'tag-c03f6a5793ce' + FEDORA_TAG: 'tag-70ac400f2325' + UBUNTU_TAG: 'tag-c03f6a5793ce' ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh' CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh' diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index 61b229da02..e7b485fcd8 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -72,4 +72,4 @@ distributions: - '3.20' - '3.19' - '3.18' - - '3.17' + - '3.17' \ No newline at end of file diff --git a/.gitlab-ci/distros-info.yml b/.gitlab-ci/distros-info.yml index 6571707f1f..831085acaa 100644 --- a/.gitlab-ci/distros-info.yml +++ b/.gitlab-ci/distros-info.yml @@ -9,8 +9,9 @@ fedora: support: yes nm: main - version: 41 - support: yes + support: 2025-11-19 nm: 1.50 + tier1-default: yes - version: 40 support: 2025-05-13 nm: 1.46 diff --git a/.gitlab-ci/distros_support.py b/.gitlab-ci/distros_support.py index c979acfe10..b8af791b2d 100755 --- a/.gitlab-ci/distros_support.py +++ b/.gitlab-ci/distros_support.py @@ -124,7 +124,20 @@ for distro, versions in distros_info.items(): # Select a Tier1 distro tier1_distro, tier1_version = "", "" + +for fed_ver_info in distros_info["fedora"]: + # We prefer the Fedora version marked as tier1-default + if fed_ver_info.get("tier1-default", False): + for tier in (tier2, tier3): + if fed_ver_info["version"] in tier.get("fedora", []): + tier1_distro = "fedora" + tier1_version = fed_ver_info["version"] + tier["fedora"].remove(fed_ver_info["version"]) + for distro in ci_distros: + if tier1_distro: + break + for tier in (tier2, tier3): if distro in tier: # Exception: we want to use fedora:latest instead of fedora:rawhide because @@ -142,8 +155,6 @@ for distro in ci_distros: if not tier[distro]: del tier[distro] break - if tier1_distro: - break if not tier1_distro or not tier1_version: print("Warn: no suitable distro for Tier 1 found", file=sys.stderr)