- image
- build
- pkg
+ - install
- test
## Common rules
- if python3 -m venv venv; then . venv/bin/activate; fi
- pip3 install apkg
- apkg build -a bird-$(cat VERSION)*.tar.gz
- #- apkg install -y pkg/pkgs/*/*/*.deb
artifacts:
paths:
- pkg/pkgs/*
- pip3 install beautifulsoup4==4.11.2
- pip3 install apkg
- apkg build -a bird-$(cat VERSION)*.tar.gz
- #- apkg install -y pkg/pkgs/*/*/*.deb
artifacts:
paths:
- pkg/pkgs/*
script:
- pip3 install apkg
- apkg build -a bird-$(cat VERSION)*.tar.gz
- #- apkg install -y pkg/pkgs/*/*/*.rpm
artifacts:
paths:
- pkg/pkgs/*
- pip3 install beautifulsoup4==4.11.2
- pip3 install apkg
- apkg build -a bird-$(cat VERSION)*.tar.gz
- #- apkg install -y pkg/pkgs/*/*/*.rpm
artifacts:
paths:
- pkg/pkgs/*
image: registry.nic.cz/labs/bird:ubuntu-24.10-amd64
+## Package installability checks
+
+.install-deb: &install-deb
+ <<: *test-job
+ stage: install
+ script:
+ # check that bird is _not_ installed now
+ - |
+ if bird --version >/dev/null 2>&1; then
+ echo "Error: bird unexpectedly installed"
+ exit 1
+ fi
+ # install packages
+ - find pkg/pkgs/ -type f -name '*.deb' '(' -ls -exec dpkg -i '{}' ';' ')'
+ # test that install is correct
+ - ./tools/test-install "$CI_COMMIT_MESSAGE"
+
+.install-rpm: &install-rpm
+ <<: *test-job
+ stage: install
+ script:
+ # check that bird is _not_ installed now
+ - |
+ if bird --version >/dev/null 2>&1; then
+ echo "Error: bird unexpectedly installed"
+ exit 1
+ fi
+ # install packages
+ - find pkg/pkgs/ -type f -name '*.rpm' '(' -ls -exec rpm -i '{}' ';' ')'
+ # test that install is correct
+ - ./tools/test-install "$CI_COMMIT_MESSAGE"
+
+
+install-centos-7-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-centos-7-amd64
+ image: registry.nic.cz/labs/bird:centos-7-amd64
+
+install-centos-8-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-centos-8-amd64
+ image: registry.nic.cz/labs/bird:centos-8-amd64
+
+install-fedora-32-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-32-amd64
+ image: registry.nic.cz/labs/bird:fedora-32-amd64
+
+install-fedora-33-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-33-amd64
+ image: registry.nic.cz/labs/bird:fedora-33-amd64
+
+install-opensuse-15.0-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-opensuse-15.0-amd64
+ image: registry.nic.cz/labs/bird:opensuse-15.0-amd64
+
+install-opensuse-15.1-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-opensuse-15.1-amd64
+ image: registry.nic.cz/labs/bird:opensuse-15.1-amd64
+
+install-opensuse-15.2-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-opensuse-15.2-amd64
+ image: registry.nic.cz/labs/bird:opensuse-15.2-amd64
+
+install-opensuse-15.3-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-opensuse-15.3-amd64
+ image: registry.nic.cz/labs/bird:opensuse-15.3-amd64
+
+install-opensuse-15.4-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-opensuse-15.4-amd64
+ image: registry.nic.cz/labs/bird:opensuse-15.4-amd64
+
+install-opensuse-15.5-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-opensuse-15.5-amd64
+ image: registry.nic.cz/labs/bird:opensuse-15.5-amd64
+
+install-fedora-34-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-34-amd64
+ image: registry.nic.cz/labs/bird:fedora-34-amd64
+
+install-fedora-35-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-35-amd64
+ image: registry.nic.cz/labs/bird:fedora-35-amd64
+
+install-fedora-36-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-36-amd64
+ image: registry.nic.cz/labs/bird:fedora-36-amd64
+
+install-fedora-37-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-37-amd64
+ image: registry.nic.cz/labs/bird:fedora-37-amd64
+
+install-fedora-38-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-38-amd64
+ image: registry.nic.cz/labs/bird:fedora-38-amd64
+
+install-fedora-39-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-39-amd64
+ image: registry.nic.cz/labs/bird:fedora-39-amd64
+
+install-fedora-40-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-40-amd64
+ image: registry.nic.cz/labs/bird:fedora-40-amd64
+
+install-fedora-41-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-41-amd64
+ image: registry.nic.cz/labs/bird:fedora-41-amd64
+
+install-fedora-42-amd64:
+ <<: *install-rpm
+ needs:
+ - job: pkg-fedora-42-amd64
+ image: registry.nic.cz/labs/bird:fedora-42-amd64
+
+install-ubuntu-18.04-amd64:
+ <<: *install-deb
+ needs:
+ - job: pkg-ubuntu-18.04-amd64
+ image: registry.nic.cz/labs/bird:ubuntu-18.04-amd64
+
+install-debian-10-amd64:
+ <<: *install-deb
+ needs:
+ - job: pkg-debian-10-amd64
+ image: registry.nic.cz/labs/bird:debian-10-amd64
+
+install-debian-10-i386:
+ <<: *install-deb
+ needs:
+ - job: pkg-debian-10-i386
+ image: registry.nic.cz/labs/bird:debian-10-i386
+
+install-debian-11-amd64:
+ <<: *install-deb
+ needs:
+ - job: pkg-debian-11-amd64
+ image: registry.nic.cz/labs/bird:debian-11-amd64
+
+install-debian-11-i386:
+ <<: *install-deb
+ needs:
+ - job: pkg-debian-11-i386
+ image: registry.nic.cz/labs/bird:debian-11-i386
+
+install-debian-12-amd64:
+ <<: *install-deb
+ needs:
+ - job: pkg-debian-12-amd64
+ image: registry.nic.cz/labs/bird:debian-12-amd64
+
+install-debian-12-i386:
+ <<: *install-deb
+ needs:
+ - job: pkg-debian-12-i386
+ image: registry.nic.cz/labs/bird:debian-12-i386
+
+install-debian-testing-amd64:
+ <<: *install-deb
+ needs:
+ - job: pkg-debian-testing-amd64
+ image: registry.nic.cz/labs/bird:debian-testing-amd64
+
+install-debian-testing-i386:
+ <<: *install-deb
+ needs:
+ - job: pkg-debian-testing-i386
+ image: registry.nic.cz/labs/bird:debian-testing-i386
+
+install-ubuntu-20.04-amd64:
+ <<: *install-deb
+ needs:
+ - job: pkg-ubuntu-20.04-amd64
+ image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64
+
+install-ubuntu-22.04-amd64:
+ <<: *install-deb
+ needs:
+ - job: pkg-ubuntu-22.04-amd64
+ image: registry.nic.cz/labs/bird:ubuntu-22.04-amd64
+
+install-ubuntu-24.04-amd64:
+ <<: *install-deb
+ needs:
+ - job: pkg-ubuntu-24.04-amd64
+ image: registry.nic.cz/labs/bird:ubuntu-24.04-amd64
+
+install-ubuntu-24.10-amd64:
+ <<: *install-deb
+ needs:
+ - job: pkg-ubuntu-24.10-amd64
+ image: registry.nic.cz/labs/bird:ubuntu-24.10-amd64
+
+
###################################
## Non-linux build tests in QEMU ##
###################################
- image
- build
- pkg
+ - install
- test
## Common rules
- if python3 -m venv venv; then . venv/bin/activate; fi
- pip3 install apkg
- apkg build -a bird-$(cat VERSION)*.tar.gz
- #- apkg install -y pkg/pkgs/*/*/*.deb
artifacts:
paths:
- pkg/pkgs/*
- pip3 install beautifulsoup4==4.11.2
- pip3 install apkg
- apkg build -a bird-$(cat VERSION)*.tar.gz
- #- apkg install -y pkg/pkgs/*/*/*.deb
artifacts:
paths:
- pkg/pkgs/*
script:
- pip3 install apkg
- apkg build -a bird-$(cat VERSION)*.tar.gz
- #- apkg install -y pkg/pkgs/*/*/*.rpm
artifacts:
paths:
- pkg/pkgs/*
- pip3 install beautifulsoup4==4.11.2
- pip3 install apkg
- apkg build -a bird-$(cat VERSION)*.tar.gz
- #- apkg install -y pkg/pkgs/*/*/*.rpm
artifacts:
paths:
- pkg/pkgs/*
{%- endif %}
{% endfor %}
+## Package installability checks
+
+.install-deb: &install-deb
+ <<: *test-job
+ stage: install
+ script:
+ # check that bird is _not_ installed now
+ - |
+ if bird --version >/dev/null 2>&1; then
+ echo "Error: bird unexpectedly installed"
+ exit 1
+ fi
+ # install packages
+ - find pkg/pkgs/ -type f -name '*.deb' '(' -ls -exec dpkg -i '{}' ';' ')'
+ # test that install is correct
+ - ./tools/test-install "$CI_COMMIT_MESSAGE"
+
+.install-rpm: &install-rpm
+ <<: *test-job
+ stage: install
+ script:
+ # check that bird is _not_ installed now
+ - |
+ if bird --version >/dev/null 2>&1; then
+ echo "Error: bird unexpectedly installed"
+ exit 1
+ fi
+ # install packages
+ - find pkg/pkgs/ -type f -name '*.rpm' '(' -ls -exec rpm -i '{}' ';' ')'
+ # test that install is correct
+ - ./tools/test-install "$CI_COMMIT_MESSAGE"
+
+{% for dist in distros %}
+install-{{ dist["name"] }}:
+ <<: *{{ {
+ "pkg-rpm": "install-rpm",
+ "pkg-rpm-wa": "install-rpm",
+ "pkg-deb": "install-deb",
+ "pkg-deb-legacy": "install-deb",
+ }[dist["type"]] }}
+ needs:
+ - job: pkg-{{ dist["name"] }}
+ image: registry.nic.cz/labs/bird:{{ dist["name"] }}
+{% endfor %}
+
###################################
## Non-linux build tests in QEMU ##
###################################
--- /dev/null
+#!/bin/sh
+
+STABLE_VERSION=$(cat VERSION)
+CI_COMMIT_MESSAGE=$(echo "$1" | sed '$s/\r\{0,1\}$//') # trimming new line
+
+bird --version 2>&1 | grep -F "$STABLE_VERSION"
+bird --version 2>version-reported
+
+if [ "$CI_COMMIT_MESSAGE" = "NEWS and version update" ]; then
+ echo "Processing a release commit"
+
+ echo "BIRD version ${STABLE_VERSION}" > version-expected
+ diff version-reported version-expected
+else
+ echo "Processing a non-release commit"
+
+ if ! grep -qF "BIRD version ${STABLE_VERSION}+branch" version-reported; then
+ echo "Error: Version mismatch!"
+ ( echo "Reported: "; cat version-reported )
+ ( echo "Expected: "; echo "BIRD version ${STABLE_VERSION}+branch.<branch-name>.<commit-hash>" )
+ exit 1
+ fi
+fi
+
+# Run BIRD with minimal config and test with simple birdc commands
+mkdir -p /run/bird
+echo "protocol device {}" > minimal.conf
+bird -c minimal.conf
+
+birdcl show proto > show-proto-out 2>&1
+birdcl down > down-out 2>&1
+birdcl show proto > show-proto-after-down-out 2>&1
+
+if ! grep -qE "BIRD .* ready\." show-proto-out || ! grep -qE "BIRD .* ready\." down-out; then
+ echo "Error: BIRD did not start correctly"
+ echo "Output:"
+ cat show-proto-out down-out
+ exit 1
+fi
+
+if ! grep -qE "device1\s*Device\s*---\s*up" show-proto-out; then
+ echo "Error: BIRD did not show protocols correcly"
+ echo "Output:"
+ cat show-proto-out
+ exit 1
+fi
+
+if ! grep -qF "Shutdown requested" down-out; then
+ echo "Error: BIRD did not shutdown correctly after DOWN command."
+ echo "Output:"
+ cat down-out
+ exit 1
+fi
+
+if ! grep -qF "Unable to connect to server control socket" show-proto-after-down-out; then
+ echo "Error: BIRD did not shutdown correctly after DOWN command."
+ echo "Output:"
+ cat show-proto-after-down-out
+ exit 1
+fi
+