Skip to content

Commit

Permalink
chore: Add support for Ubuntu 24.04 (Noble) in Linux tests and add it…
Browse files Browse the repository at this point in the history
… to the CHANGELOG.md
  • Loading branch information
TheophileDiot committed May 7, 2024
1 parent 2a061df commit 5b4602f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/staging-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
- name: Pull BW linux ubuntu test image
if: inputs.TYPE == 'linux'
run: docker pull ghcr.io/bunkerity/ubuntu-tests:testing && docker tag ghcr.io/bunkerity/ubuntu-tests:testing local/ubuntu:latest
- name: Pull BW linux ubuntu noble test image
if: inputs.TYPE == 'linux'
run: docker pull ghcr.io/bunkerity/ubuntu-noble-tests:testing && docker tag ghcr.io/bunkerity/ubuntu-noble-tests:testing local/ubuntu-noble:latest
- name: Pull BW linux debian test image
if: inputs.TYPE == 'linux'
run: docker pull ghcr.io/bunkerity/debian-tests:testing && docker tag ghcr.io/bunkerity/debian-tests:testing local/debian:latest
Expand Down Expand Up @@ -121,6 +124,12 @@ jobs:
env:
TEST_DOMAINS: ${{ secrets.TEST_DOMAINS_LINUX }}
ROOT_DOMAIN: ${{ secrets.ROOT_DOMAIN }}
- name: Run Linux ubuntu noble tests
if: inputs.TYPE == 'linux'
run: export $(echo "$TEST_DOMAINS" | xargs) && ./tests/main.py "linux" "ubuntu-noble"
env:
TEST_DOMAINS: ${{ secrets.TEST_DOMAINS_LINUX }}
ROOT_DOMAIN: ${{ secrets.ROOT_DOMAIN }}
- name: Run Linux debian tests
if: inputs.TYPE == 'linux'
run: export $(echo "$TEST_DOMAINS" | xargs) && ./tests/main.py "linux" "debian"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## v1.5.7 - ????/??/??

- [LINUX] Support Ubuntu 24.04 (Noble)
- [BUGFIX] Fix rare error when the cache is not properly initialized and jobs are executed
- [BUGFIX] Fix bug when downloading new mmdb files
- [BUGFIX] Remove potential false positives with ModSecurity on the jobs page of the web UI
Expand Down
8 changes: 4 additions & 4 deletions tests/LinuxTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LinuxTest(Test):
def __init__(self, name, timeout, tests, distro, domains={}):
super().__init__(name, "linux", timeout, tests, delay=20)
self._domains = domains
if distro not in ("ubuntu", "debian", "fedora", "centos") and not distro.startswith("rhel"):
if distro not in ("ubuntu", "ubuntu-noble", "debian", "fedora", "centos") and not distro.startswith("rhel"):
raise Exception(f"unknown distro {distro}")
self.__distro = distro

Expand All @@ -24,7 +24,7 @@ def init(distro):
proc = run(cmd, shell=True)
if proc.returncode != 0:
raise Exception("docker run failed (linux stack)")
if distro in ("ubuntu", "debian"):
if distro in ("ubuntu", "ubuntu-noble", "debian"):
cmd = "echo force-bad-version >> /etc/dpkg/dpkg.cfg ; apt install -y /opt/\\$(ls /opt | grep deb)"
elif distro in ("centos", "fedora") or distro.startswith("rhel"):
cmd = "dnf install -y /opt/\\$(ls /opt | grep rpm)"
Expand All @@ -34,12 +34,12 @@ def init(distro):
proc = LinuxTest.docker_exec(distro, "systemctl start bunkerweb")
if proc.returncode != 0:
raise Exception("docker exec systemctl start failed (linux stack)")
if distro in ("ubuntu", "debian"):
if distro in ("ubuntu", "ubuntu-noble", "debian"):
LinuxTest.docker_exec(
distro,
"DEBIAN_FRONTEND=noninteractive apt-get install -y php-fpm unzip",
)
if distro == "ubuntu":
if distro in ("ubuntu", "ubuntu-noble"):
LinuxTest.docker_cp(
distro,
"./tests/www-deb.conf",
Expand Down

0 comments on commit 5b4602f

Please sign in to comment.