File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This Dockerfile is used in the linux job for Alpine Linux.
2+ #
3+ # As the linux.bash script is, in fact, a bash script and Alpine does not ship
4+ # a bash by default, the "alpine:bash" container will be built using this
5+ # Dockerfile in the GitHub Action.
6+
7+ FROM alpine:3
8+ RUN ["apk" , "--no-cache" , "add" , "bash" ]
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -exo pipefail
33
4- export PATH=" /usr/lib/ccache:/usr/lib64/ccache:$PATH "
4+ export PATH=" /usr/lib/ccache/bin:/usr/lib/ccache :/usr/lib64/ccache:$PATH "
55export CCACHE_DIR=/icinga2/ccache
66export CTEST_OUTPUT_ON_FAILURE=1
77CMAKE_OPTS=()
88
99case " $DISTRO " in
10+ alpine:* )
11+ # Packages inspired by the Alpine package, just
12+ # - LibreSSL instead of OpenSSL 3 and
13+ # - no MariaDB or libpq as they depend on OpenSSL.
14+ # https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/icinga2/APKBUILD
15+ apk add bison boost-dev ccache cmake flex g++ libedit-dev libressl-dev ninja-build tzdata
16+ ln -vs /usr/lib/ninja-build/bin/ninja /usr/local/bin/ninja
17+
18+ CMAKE_OPTS=" -DUSE_SYSTEMD=OFF -DICINGA2_WITH_MYSQL=OFF -DICINGA2_WITH_PGSQL=OFF"
19+
20+ # This test fails due to some glibc/musl mismatch regarding timezone PST/PDT.
21+ # - https://www.openwall.com/lists/musl/2024/03/05/2
22+ # - https://gitlab.alpinelinux.org/alpine/aports/-/blob/b3ea02e2251451f9511086e1970f21eb640097f7/community/icinga2/disable-failing-tests.patch
23+ sed -i ' /icinga_legacytimeperiod\/dst$/d' /icinga2/test/CMakeLists.txt
24+ ;;
25+
1026 amazonlinux:2)
1127 amazon-linux-extras install -y epel
1228 yum install -y bison ccache cmake3 gcc-c++ flex ninja-build system-rpm-config \
Original file line number Diff line number Diff line change 2121 max-parallel : 2
2222 matrix :
2323 distro :
24+ # Alpine Linux to build Icinga 2 with LibreSSL, OpenBSD's default.
25+ # The "alpine:bash" image will be built below based on "alpine:3".
26+ - alpine:bash
27+
2428 - amazonlinux:2
2529 - amazonlinux:2023
2630
6872 path : ccache
6973 key : ccache/${{ matrix.distro }}
7074
71- - name : Build
75+ - name : Build Alpine Docker Image
76+ if : " matrix.distro == 'alpine:bash'"
77+ run : >-
78+ docker build --file .github/workflows/alpine-bash.Dockerfile
79+ --tag alpine:bash `mktemp -d`
80+
81+ - name : Build Icinga
7282 run : >-
7383 docker run --rm -v "$(pwd):/icinga2" -e DISTRO=${{ matrix.distro }}
7484 --platform ${{ matrix.platform }} ${{ matrix.distro }} /icinga2/.github/workflows/linux.bash
You can’t perform that action at this time.
0 commit comments