summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md46
-rw-r--r--.github/ISSUE_TEMPLATE/config.yml5
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md24
-rw-r--r--.github/workflows/authors-file.yml39
-rw-r--r--.github/workflows/docker.yml37
-rwxr-xr-x.github/workflows/linux.bash95
-rw-r--r--.github/workflows/linux.yml56
-rw-r--r--.github/workflows/rpm.yml116
-rw-r--r--.github/workflows/windows.yml53
9 files changed, 471 insertions, 0 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..7f6e121
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,46 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+## Describe the bug
+
+A clear and concise description of what the bug is.
+
+Please ensure to read https://github.com/Icinga/icinga2/blob/master/doc/15-troubleshooting.md first. Formatting tips: GitHub supports Markdown: https://guides.github.com/features/mastering-markdown/
+
+## To Reproduce
+
+Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include configuration, logs, etc. to reproduce, if relevant.
+
+1.
+2.
+3.
+4.
+
+## Expected behavior
+
+A clear and concise description of what you expected to happen.
+
+## Screenshots
+
+If applicable, add screenshots to help explain your problem.
+
+## Your Environment
+
+Include as many relevant details about the environment you experienced the problem in
+
+* Version used (`icinga2 --version`):
+* Operating System and version:
+* Enabled features (`icinga2 feature list`):
+* Icinga Web 2 version and modules (System - About):
+* Config validation (`icinga2 daemon -C`):
+* If you run multiple Icinga 2 instances, the `zones.conf` file (or `icinga2 object list --type Endpoint` and `icinga2 object list --type Zone`) from all affected nodes.
+
+## Additional context
+
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..cfcedf2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: true
+contact_links:
+ - name: Ask a question
+ url: https://community.icinga.com/c/icinga-2/6
+ about: Ask a question in our community forum
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..1d19ccf
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,24 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+## Is your feature request related to a problem? Please describe.
+
+A clear and concise description of what the problem is. Ex. I'm always using this feature but am missing [...]
+
+## Describe the solution you'd like
+
+A clear and concise description of what you want to happen.
+
+## Describe alternatives you've considered
+
+A clear and concise description of any alternative solutions or features you've considered.
+
+## Additional context
+
+Add any other context or screenshots about the feature request here.
diff --git a/.github/workflows/authors-file.yml b/.github/workflows/authors-file.yml
new file mode 100644
index 0000000..3970aee
--- /dev/null
+++ b/.github/workflows/authors-file.yml
@@ -0,0 +1,39 @@
+name: AUTHORS file
+
+on:
+ pull_request: { }
+
+jobs:
+ authors-file:
+ name: AUTHORS file
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout HEAD
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Check whether ./AUTHORS is up-to-date
+ run: |
+ set -exo pipefail
+ sort -uo AUTHORS AUTHORS
+ git add AUTHORS
+ git log --format='format:%aN <%aE>' "$(
+ git merge-base "origin/$GITHUB_BASE_REF" "origin/$GITHUB_HEAD_REF"
+ )..origin/$GITHUB_HEAD_REF" >> AUTHORS
+ sort -uo AUTHORS AUTHORS
+ git diff AUTHORS >> AUTHORS.diff
+
+ - name: Complain if ./AUTHORS isn't up-to-date
+ run: |
+ if [ -s AUTHORS.diff ]; then
+ cat <<'EOF' >&2
+ There are the following new authors. If the commit author data is correct,
+ either add them to the AUTHORS file or update .mailmap. See gitmailmap(5) or:
+ https://git-scm.com/docs/gitmailmap
+ Don't hesitate to ask us for help if necessary.
+ EOF
+ cat AUTHORS.diff
+ exit 1
+ fi
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
new file mode 100644
index 0000000..dc23459
--- /dev/null
+++ b/.github/workflows/docker.yml
@@ -0,0 +1,37 @@
+name: Docker image
+
+on:
+ pull_request: {}
+ push:
+ branches:
+ - master
+ - 'support/*'
+ release:
+ types:
+ - published
+
+concurrency:
+ group: docker-${{ github.event_name == 'push' && github.sha || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ docker-release:
+ if: github.event_name == 'release'
+ concurrency: docker-release
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Docker image
+ uses: Icinga/docker-icinga2@master
+ with:
+ dockerhub-token: '${{ secrets.DOCKER_HUB_PERSONAL_TOKEN }}'
+
+ docker:
+ if: github.event_name != 'release'
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Docker image
+ uses: Icinga/docker-icinga2@master
+ with:
+ dockerhub-token: '${{ secrets.DOCKER_HUB_PERSONAL_TOKEN }}'
diff --git a/.github/workflows/linux.bash b/.github/workflows/linux.bash
new file mode 100755
index 0000000..fe0e7d5
--- /dev/null
+++ b/.github/workflows/linux.bash
@@ -0,0 +1,95 @@
+#!/bin/bash
+set -exo pipefail
+
+export PATH="/usr/lib/ccache:/usr/lib64/ccache:/opt/rh/devtoolset-11/root/usr/bin:$PATH"
+export CCACHE_DIR=/icinga2/ccache
+export CTEST_OUTPUT_ON_FAILURE=1
+CMAKE_OPTS=''
+
+case "$DISTRO" in
+ amazonlinux:2)
+ amazon-linux-extras install -y epel
+ yum install -y bison ccache cmake3 gcc-c++ flex ninja-build \
+ {libedit,mariadb,ncurses,openssl,postgresql,systemd}-devel
+
+ yum install -y bzip2 tar wget
+ wget https://boostorg.jfrog.io/artifactory/main/release/1.69.0/source/boost_1_69_0.tar.bz2
+ tar -xjf boost_1_69_0.tar.bz2
+
+ (
+ cd boost_1_69_0
+ ./bootstrap.sh --with-libraries=context,coroutine,date_time,filesystem,iostreams,program_options,regex,system,test,thread
+ ./b2
+ )
+
+ ln -vs /usr/bin/cmake3 /usr/local/bin/cmake
+ ln -vs /usr/bin/ninja-build /usr/local/bin/ninja
+ CMAKE_OPTS='-DBOOST_INCLUDEDIR=/boost_1_69_0 -DBOOST_LIBRARYDIR=/boost_1_69_0/stage/lib'
+ export LD_LIBRARY_PATH=/boost_1_69_0/stage/lib
+ ;;
+
+ amazonlinux:20*)
+ dnf install -y bison cmake flex gcc-c++ ninja-build \
+ {boost,libedit,mariadb1\*,ncurses,openssl,postgresql,systemd}-devel
+ ;;
+
+ centos:*)
+ yum install -y centos-release-scl epel-release
+ yum install -y bison ccache cmake3 devtoolset-11-gcc-c++ flex ninja-build \
+ {boost169,libedit,mariadb,ncurses,openssl,postgresql,systemd}-devel
+
+ ln -vs /usr/bin/cmake3 /usr/local/bin/cmake
+ ln -vs /usr/bin/ccache /usr/lib64/ccache/g++
+ CMAKE_OPTS='-DBOOST_INCLUDEDIR=/usr/include/boost169 -DBOOST_LIBRARYDIR=/usr/lib64/boost169'
+ ;;
+
+ debian:*|ubuntu:*)
+ apt-get update
+ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-{recommends,suggests} -y bison \
+ ccache cmake flex g++ lib{boost-all,edit,mariadb,ncurses,pq,ssl,systemd}-dev ninja-build tzdata
+ ;;
+
+ fedora:*)
+ dnf install -y bison ccache cmake flex gcc-c++ ninja-build \
+ {boost,libedit,mariadb,ncurses,openssl,postgresql,systemd}-devel
+ ;;
+
+ opensuse/*)
+ zypper in -y bison ccache cmake flex gcc-c++ ninja {lib{edit,mariadb,openssl},ncurses,postgresql,systemd}-devel \
+ libboost_{context,coroutine,filesystem,iostreams,program_options,regex,system,test,thread}-devel
+ ;;
+
+ rockylinux:*)
+ dnf install -y 'dnf-command(config-manager)' epel-release
+
+ case "$DISTRO" in
+ *:8)
+ dnf config-manager --enable powertools
+ ;;
+ *)
+ dnf config-manager --enable crb
+ ;;
+ esac
+
+ dnf install -y bison ccache cmake gcc-c++ flex ninja-build \
+ {boost,libedit,mariadb,ncurses,openssl,postgresql,systemd}-devel
+ ;;
+esac
+
+mkdir /icinga2/build
+cd /icinga2/build
+
+cmake \
+ -GNinja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DICINGA2_UNITY_BUILD=ON \
+ -DUSE_SYSTEMD=ON \
+ -DICINGA2_USER=$(id -un) \
+ -DICINGA2_GROUP=$(id -gn) \
+ $CMAKE_OPTS ..
+
+ninja
+
+ninja test
+ninja install
+icinga2 daemon -C
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
new file mode 100644
index 0000000..6c3c5dd
--- /dev/null
+++ b/.github/workflows/linux.yml
@@ -0,0 +1,56 @@
+name: Linux
+
+on:
+ push:
+ branches:
+ - master
+ - 'support/*'
+ pull_request: {}
+
+concurrency:
+ group: linux-${{ github.event_name == 'push' && github.sha || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ linux:
+ name: ${{ matrix.distro }}
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ max-parallel: 2
+ matrix:
+ distro:
+ - amazonlinux:2
+ - amazonlinux:2023
+ - centos:7 # and RHEL 7
+ - debian:10
+ - debian:11 # and Raspbian 11
+ - debian:12 # and Raspbian 12
+ - fedora:37
+ - fedora:38
+ - fedora:39
+ - opensuse/leap:15.3 # SLES 15.3
+ - opensuse/leap:15.4 # and SLES 15.4
+ - opensuse/leap:15.5 # and SLES 15.5
+ - rockylinux:8 # RHEL 8
+ - rockylinux:9 # RHEL 9
+ - ubuntu:20.04
+ - ubuntu:22.04
+ - ubuntu:23.04
+ - ubuntu:23.10
+
+ steps:
+ - name: Checkout HEAD
+ uses: actions/checkout@v3
+
+ - name: Restore/backup ccache
+ uses: actions/cache@v3
+ with:
+ path: ccache
+ key: ccache/${{ matrix.distro }}
+
+ - name: Build
+ run: >-
+ docker run --rm -v "$(pwd):/icinga2" -e DISTRO=${{ matrix.distro }}
+ ${{ matrix.distro }} /icinga2/.github/workflows/linux.bash
diff --git a/.github/workflows/rpm.yml b/.github/workflows/rpm.yml
new file mode 100644
index 0000000..5cf8b10
--- /dev/null
+++ b/.github/workflows/rpm.yml
@@ -0,0 +1,116 @@
+name: .rpm
+
+on:
+ push:
+ branches:
+ - master
+ - 'support/*'
+ pull_request: {}
+
+concurrency:
+ group: rpm-${{ github.event_name == 'push' && github.sha || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ rpm:
+ name: .rpm (${{ matrix.distro.name }}, ${{ matrix.distro.release }})
+
+ strategy:
+ fail-fast: false
+ max-parallel: 1
+ matrix:
+ distro:
+ - name: sles
+ release: '12.5'
+ subscription: true
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Vars
+ id: vars
+ env:
+ GITLAB_RO_TOKEN: '${{ secrets.GITLAB_RO_TOKEN }}'
+ run: |
+ if [ ${{ matrix.distro.subscription }} = true ]; then
+ if [ "$(tr -d '\n' <<<"$GITLAB_RO_TOKEN" |wc -c)" -eq 0 ]; then
+ echo '::set-output name=CAN_BUILD::false'
+ echo '::set-output name=NEED_LOGIN::false'
+ else
+ echo '::set-output name=CAN_BUILD::true'
+ echo '::set-output name=NEED_LOGIN::true'
+ fi
+ else
+ echo '::set-output name=CAN_BUILD::true'
+ echo '::set-output name=NEED_LOGIN::false'
+ fi
+
+ - name: Checkout HEAD
+ if: "steps.vars.outputs.CAN_BUILD == 'true'"
+ uses: actions/checkout@v1
+
+ - name: Login
+ if: "steps.vars.outputs.NEED_LOGIN == 'true'"
+ env:
+ GITLAB_RO_TOKEN: '${{ secrets.GITLAB_RO_TOKEN }}'
+ run: |
+ docker login registry.icinga.com -u github-actions --password-stdin <<<"$GITLAB_RO_TOKEN"
+
+ - name: rpm-icinga2
+ if: "steps.vars.outputs.CAN_BUILD == 'true' && !matrix.distro.subscription"
+ run: |
+ set -exo pipefail
+ git clone https://git.icinga.com/packaging/rpm-icinga2.git
+ chmod o+w rpm-icinga2
+
+ - name: subscription-rpm-icinga2
+ if: "steps.vars.outputs.CAN_BUILD == 'true' && matrix.distro.subscription"
+ env:
+ GITLAB_RO_TOKEN: '${{ secrets.GITLAB_RO_TOKEN }}'
+ run: |
+ set -exo pipefail
+ git config --global credential.helper store
+ cat <<EOF >~/.git-credentials
+ https://github-actions:${GITLAB_RO_TOKEN}@git.icinga.com
+ EOF
+ git clone https://git.icinga.com/packaging/subscription-rpm-icinga2.git rpm-icinga2
+ chmod o+w rpm-icinga2
+
+ - name: Restore/backup ccache
+ if: "steps.vars.outputs.CAN_BUILD == 'true'"
+ id: ccache
+ uses: actions/cache@v1
+ with:
+ path: rpm-icinga2/ccache
+ key: |-
+ ${{ matrix.distro.name }}/${{ matrix.distro.release }}-ccache-${{ hashFiles('rpm-icinga2/ccache') }}
+
+ - name: Binary
+ if: "steps.vars.outputs.CAN_BUILD == 'true'"
+ run: |
+ set -exo pipefail
+ git checkout -B master
+ if [ -e rpm-icinga2/ccache ]; then
+ chmod -R o+w rpm-icinga2/ccache
+ fi
+ docker run --rm \
+ -v "$(pwd)/rpm-icinga2:/rpm-icinga2" \
+ -v "$(pwd)/.git:/icinga2.git:ro" \
+ -w /rpm-icinga2 \
+ -e ICINGA_BUILD_PROJECT=icinga2 \
+ -e ICINGA_BUILD_TYPE=snapshot \
+ -e UPSTREAM_GIT_URL=file:///icinga2.git \
+ registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.release }} \
+ icinga-build-package
+
+ - name: Test
+ if: "steps.vars.outputs.CAN_BUILD == 'true'"
+ run: |
+ set -exo pipefail
+ docker run --rm \
+ -v "$(pwd)/rpm-icinga2:/rpm-icinga2" \
+ -w /rpm-icinga2 \
+ -e ICINGA_BUILD_PROJECT=icinga2 \
+ -e ICINGA_BUILD_TYPE=snapshot \
+ registry.icinga.com/build-docker/${{ matrix.distro.name }}/${{ matrix.distro.release }} \
+ icinga-build-test
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644
index 0000000..18d8e57
--- /dev/null
+++ b/.github/workflows/windows.yml
@@ -0,0 +1,53 @@
+name: Windows
+
+on:
+ push:
+ branches:
+ - master
+ - 'support/*'
+ pull_request: {}
+
+concurrency:
+ group: windows-${{ github.event_name == 'push' && github.sha || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ windows:
+ name: Windows
+
+ strategy:
+ fail-fast: false
+ max-parallel: 1
+ matrix:
+ bits: [32, 64]
+
+ runs-on: windows-2019
+
+ env:
+ BITS: '${{ matrix.bits }}'
+ ICINGA_BUILD_TYPE: snapshot
+ UPSTREAM_GIT_URL: file://D:/a/icinga2/icinga2/.git
+
+ steps:
+ - name: Checkout HEAD
+ uses: actions/checkout@v1
+
+ - name: windows-icinga2
+ run: |
+ git clone https://git.icinga.com/packaging/windows-icinga2.git
+
+ - name: Build tools
+ run: |
+ & .\doc\win-dev.ps1
+
+ - name: Source
+ run: |
+ git checkout -B master
+ cd windows-icinga2
+ & .\source.ps1
+
+ - name: Binary
+ working-directory: windows-icinga2
+ run: |
+ New-Item -ItemType Directory -Path 'C:\Program Files\Icinga2\WillBeRemoved' -ErrorAction SilentlyContinue
+ & .\build.ps1