Skip to content

Commit

Permalink
cicd: fix failed builds
Browse files Browse the repository at this point in the history
- fix broken packages issue for Postgres 15
- add Postrges 16 to the test matrix
- add CentOS 8 to the test matrix
- bump Zabbix Server version from 6.2.6 to 6.2.9
  • Loading branch information
mstyushin committed Apr 3, 2024
1 parent 341d2f1 commit 7f87b0a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 11 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/mamonsu-tests-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,30 @@ jobs:
MAMONSU_PATH: '/home/runner/work/mamonsu/mamonsu/'
strategy:
matrix:
docker_os: ['centos:7']
zabbix_version: ['6.2.6']
pg_version: ['12', '13', '14', '15', '16']
docker_os: ['centos:7', 'centos:8']
zabbix_version: ['6.2.9']
pg_version: ['12', '13', '14', '15']
include:
- docker_os: 'centos:8'
pg_version: '16'
zabbix_version: '6.2.9'
exclude:
- docker_os: 'centos:8'
pg_version: '12'
- docker_os: 'centos:8'
pg_version: '13'
- docker_os: 'centos:8'
pg_version: '14'
- docker_os: 'centos:8'
pg_version: '15'

steps:
- name: Checkout mamonsu repo
uses: actions/checkout@v1

- name: Install docker-compose
run: sudo apt-get update
- run: sudo rm /usr/local/bin/docker-compose
- run: sudo rm -f /usr/local/bin/docker-compose
- run: curl -L https://github.com/docker/compose/releases/download/${{ env.DOCKER_COMPOSE_VERSION }}/docker-compose-`uname -s`-`uname -m` > docker-compose
- run: chmod +x docker-compose
- run: sudo mv docker-compose /usr/local/bin
Expand Down Expand Up @@ -91,4 +104,4 @@ jobs:
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/metrics.sh --pg-version="${{ matrix.pg_version }}" --os="${{ matrix.docker_os }}"

- name: Test Mamonsu removal
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/mamonsu_removal.sh --os="${{ matrix.docker_os }}"
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/mamonsu_removal.sh --os="${{ matrix.docker_os }}"
22 changes: 17 additions & 5 deletions .github/workflows/mamonsu-tests-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,35 @@ jobs:
MAMONSU_PATH: '/home/runner/work/mamonsu/mamonsu/'
strategy:
matrix:
docker_os: ['ubuntu:20.04', 'centos:7']
zabbix_version: ['4.0.44', '4.4.10', '5.0.30', '5.4.12', '6.0.12', '6.2.6']
pg_version: ['12', '13', '14', '15', '16']
docker_os: ['ubuntu:20.04', 'centos:7', 'centos:8']
zabbix_version: ['4.0.44', '4.4.10', '5.0.30', '5.4.12', '6.0.12', '6.2.9']
pg_version: ['12', '13', '14', '15']
include:
- docker_os: 'centos:8'
pg_version: '16'
zabbix_version: '6.2.9'
exclude:
# excludes PG 15, 16 on CentOS
- docker_os: 'centos:7'
pg_version: '15'
- docker_os: 'centos:7'
pg_version: '16'
- docker_os: 'centos:8'
pg_version: '12'
- docker_os: 'centos:8'
pg_version: '13'
- docker_os: 'centos:8'
pg_version: '14'
- docker_os: 'centos:8'
pg_version: '15'

steps:
- name: Checkout mamonsu repo
uses: actions/checkout@v1

- name: Install docker-compose
run: sudo apt-get update
- run: sudo rm /usr/local/bin/docker-compose
- run: sudo rm -f /usr/local/bin/docker-compose
- run: curl -L https://github.com/docker/compose/releases/download/${{ env.DOCKER_COMPOSE_VERSION }}/docker-compose-`uname -s`-`uname -m` > docker-compose
- run: chmod +x docker-compose
- run: sudo mv docker-compose /usr/local/bin
Expand Down Expand Up @@ -97,4 +109,4 @@ jobs:
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/metrics.sh --pg-version="${{ matrix.pg_version }}" --os="${{ matrix.docker_os }}"

- name: Test Mamonsu removal
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/mamonsu_removal.sh --os="${{ matrix.docker_os }}"
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) bash /mamonsu/github-actions-tests/mamonsu_removal.sh --os="${{ matrix.docker_os }}"
6 changes: 5 additions & 1 deletion github-actions-tests/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,24 @@ if [ "${OS}" = "centos:7" ]; then
eval "${PACKAGE_MANAGER_INSTALL} wget"
eval "${PACKAGE_MANAGER_INSTALL} bc"
eval "${PACKAGE_MANAGER_INSTALL} unzip"
REPO=${PACKAGE_MANAGER_INSTALL}" https://download.postgresql.org/pub/repos/yum/reporpms/EL-"$(echo ${OS} | sed -r 's/^[^0-9]*([0-9]+).*/\1/')"-x86_64/pgdg-redhat-repo-latest.noarch.rpm"
eval "${PACKAGE_MANAGER_INSTALL} https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
REPO=${PACKAGE_MANAGER_INSTALL}" https://download.postgresql.org/pub/repos/yum/reporpms/EL-"$(echo ${OS} | sed -r 's/^[^0-9]*([0-9]+).*/\1/')"-x86_64/pgdg-redhat-repo-latest.noarch.rpm"\

# run tests
sudo bash /mamonsu/github-actions-tests/pg_install.sh --os="${OS}" --pmi="${PACKAGE_MANAGER_INSTALL}" --repo="${REPO}" --pg-version="${PG_VERSION}"

elif [ "${OS}" = "centos:8" ]; then
# install and set up components missing in docker image (sudo, wget, bc, unzip)
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
dnf update -y
dnf install -y sudo
PACKAGE_MANAGER_INSTALL="sudo dnf -y install"
PACKAGE_MANAGER_REMOVE="sudo dnf -y remove"
eval "${PACKAGE_MANAGER_INSTALL} wget"
eval "${PACKAGE_MANAGER_INSTALL} bc"
eval "${PACKAGE_MANAGER_INSTALL} unzip"
eval "${PACKAGE_MANAGER_INSTALL} https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm"
REPO=${PACKAGE_MANAGER_INSTALL}" https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm; sudo dnf -qy module disable postgresql"

# run tests
Expand Down

0 comments on commit 7f87b0a

Please sign in to comment.