From 938905e85bcf81240c2a77ba3f4de563283cb48c Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Mon, 1 Dec 2025 15:27:57 +0100 Subject: [PATCH] fixup! fixup! fixup! fixup! WIP: more stable checks --- .gitlab-ci.yml | 66 ++++++++++++++++++++++++------------- misc/gitlab/template.yml.j2 | 26 +++++++++++++-- 2 files changed, 68 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00624bc03..9100a8569 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1282,7 +1282,7 @@ install-ubuntu-24.10-amd64: image: registry.nic.cz/labs/bird:ubuntu-24.10-amd64 -.install-stable-repo-rpm: &install-stable-repo-rpm +.install-stable-repo-yum: &install-stable-repo-yum <<: *run-every-4-hours stage: install needs: [] @@ -1312,148 +1312,170 @@ install-ubuntu-24.10-amd64: - yum -y update - yum -y install bird-3.1.4 +.install-stable-repo-zypper: &install-stable-repo-zypper + <<: *run-every-4-hours + stage: install + needs: [] + script: + # check that bird is _not_ installed now and no user or group bird exists + - | + if bird --version >/dev/null 2>&1; then + echo "Error: BIRD unexpectedly installed" + exit 1 + fi + if id -g bird >/dev/null 2>&1; then + echo "Error: User group 'bird' exist before installation" + exit 1 + fi + if id -u bird >/dev/null 2>&1; then + echo "Error: User 'bird' exist before installation" + exit 1 + fi + - zypper ar $REPOURL bird.nic.cz + - zypper in bird=3.1.4 + install-stable-repo-centos-7-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:centos-7-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/centos/7/x86_64 install-stable-repo-centos-8-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:centos-8-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/centos/8/x86_64 install-stable-repo-rocky-08-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:rocky-08-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/rocky/08/x86_64 install-stable-repo-rocky-09-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:rocky-09-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/rocky/09/x86_64 install-stable-repo-fedora-32-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-32-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/32/x86_64 install-stable-repo-fedora-33-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-33-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/33/x86_64 install-stable-repo-opensuse-15.0-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-zypper image: registry.nic.cz/labs/bird:opensuse-15.0-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/opensuse/15.0/x86_64 install-stable-repo-opensuse-15.1-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-zypper image: registry.nic.cz/labs/bird:opensuse-15.1-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/opensuse/15.1/x86_64 install-stable-repo-opensuse-15.2-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-zypper image: registry.nic.cz/labs/bird:opensuse-15.2-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/opensuse/15.2/x86_64 install-stable-repo-opensuse-15.3-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-zypper image: registry.nic.cz/labs/bird:opensuse-15.3-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/opensuse/15.3/x86_64 install-stable-repo-opensuse-15.4-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-zypper image: registry.nic.cz/labs/bird:opensuse-15.4-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/opensuse/15.4/x86_64 install-stable-repo-opensuse-15.5-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-zypper image: registry.nic.cz/labs/bird:opensuse-15.5-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/opensuse/15.5/x86_64 install-stable-repo-fedora-34-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-34-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/34/x86_64 install-stable-repo-fedora-35-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-35-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/35/x86_64 install-stable-repo-fedora-36-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-36-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/36/x86_64 install-stable-repo-fedora-37-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-37-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/37/x86_64 install-stable-repo-fedora-38-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-38-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/38/x86_64 install-stable-repo-fedora-39-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-39-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/39/x86_64 install-stable-repo-fedora-40-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-40-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/40/x86_64 install-stable-repo-fedora-41-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-41-amd64 variables: # This abuses the fact that we are building for amd64 only. REPOURL: http://pkg.labs.nic.cz/rpm/bird/fedora/41/x86_64 install-stable-repo-fedora-42-amd64: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-yum image: registry.nic.cz/labs/bird:fedora-42-amd64 variables: # This abuses the fact that we are building for amd64 only. diff --git a/misc/gitlab/template.yml.j2 b/misc/gitlab/template.yml.j2 index d27bdd430..96f51a94f 100644 --- a/misc/gitlab/template.yml.j2 +++ b/misc/gitlab/template.yml.j2 @@ -374,7 +374,7 @@ install-{{ dist["name"] }}: image: registry.nic.cz/labs/bird:{{ dist["name"] }} {% endfor %} -.install-stable-repo-rpm: &install-stable-repo-rpm +.install-stable-repo-yum: &install-stable-repo-yum <<: *run-every-4-hours stage: install needs: [] @@ -404,11 +404,33 @@ install-{{ dist["name"] }}: - yum -y update - yum -y install bird-3.1.4 +.install-stable-repo-zypper: &install-stable-repo-zypper + <<: *run-every-4-hours + stage: install + needs: [] + script: + # check that bird is _not_ installed now and no user or group bird exists + - | + if bird --version >/dev/null 2>&1; then + echo "Error: BIRD unexpectedly installed" + exit 1 + fi + if id -g bird >/dev/null 2>&1; then + echo "Error: User group 'bird' exist before installation" + exit 1 + fi + if id -u bird >/dev/null 2>&1; then + echo "Error: User 'bird' exist before installation" + exit 1 + fi + - zypper ar $REPOURL bird.nic.cz + - zypper in bird=3.1.4 + {%- for dist in distros %} {%- if dist["type"] == "pkg-rpm" or dist["type"] == "pkg-rpm-wa" %} install-stable-repo-{{ dist["name"] }}: - <<: *install-stable-repo-rpm + <<: *install-stable-repo-{% if dist["name"][:9] == "opensuse-" %}zypper{% else %}yum{% endif %} image: registry.nic.cz/labs/bird:{{ dist["name"] }} variables: # This abuses the fact that we are building for amd64 only. -- 2.47.3