Skip to content

Commit 5299468

Browse files
committed
feat(ci/cd): add build target for SLE 16
1 parent 6fbcd04 commit 5299468

7 files changed

Lines changed: 35 additions & 11 deletions

File tree

.github/workflows/lf-build-linux-aarch64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
target-distros:
7-
description: 'Space-separated list of operating systems to compile on and build packages for. Supported: `debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 ubuntu2004 ubuntu2204 ubuntu2404`. Cannot be empty.'
7+
description: 'Space-separated list of operating systems to compile on and build packages for. Supported: `debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 sle16 ubuntu2004 ubuntu2204 ubuntu2404`. Cannot be empty.'
88
required: true
9-
default: 'debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 ubuntu2004 ubuntu2204 ubuntu2404'
9+
default: 'debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 sle16 ubuntu2004 ubuntu2204 ubuntu2404'
1010
version:
1111
description: 'Package Version'
1212
required: true

.github/workflows/lf-build-linux-x86_64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
target-distros:
7-
description: 'Space-separated list of operating systems to compile on and build packages for. Supported: `debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 ubuntu2004 ubuntu2204 ubuntu2404`. Cannot be empty.'
7+
description: 'Space-separated list of operating systems to compile on and build packages for. Supported: `debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 sle16 ubuntu2004 ubuntu2204 ubuntu2404`. Cannot be empty.'
88
required: true
9-
default: 'debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 ubuntu2004 ubuntu2204 ubuntu2404'
9+
default: 'debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 sle16 ubuntu2004 ubuntu2204 ubuntu2404'
1010
version:
1111
description: 'Package Version'
1212
required: true

BUILD.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ Standalone Ubuntu
4343

4444
The following steps describe the **manual package building process on an Ubuntu 24.04 LTS host**. The same steps have been automated using GitHub actions. See the [.github/workflows](https://github.com/Linuxfabrik/monitoring-plugins/blob/main/.github/workflows/) as well as the [build](https://github.com/Linuxfabrik/monitoring-plugins/tree/main/build) folder for details.
4545

46-
To be able to perform the same steps on a local Ubuntu host as well as on a GitHub runner, we decided to minimize the use of GitHub actions for the Linux build process (and therefore use some build scripts), and maximize the use of GitHub actions on Windows. The build scripts are written in bash and make heavy use of environment variables to be compliant with the GitHub runners.
46+
To be able to perform the same steps on a local Ubuntu host as well as on a GitHub runner, we decided to minimize the use of GitHub actions for the Linux build process (and therefore use some build scripts) and maximize the use of GitHub actions on Windows. The build scripts are written in bash and make heavy use of environment variables to be compliant with the GitHub runners.
4747

48-
To build on Linux, first set environment variables for (absolute) paths, versions etc.:
48+
To build on Linux, first set environment variables for (absolute) paths, versions, etc.:
4949

5050
```bash
5151
cat > env-file << 'EOF'
@@ -54,7 +54,7 @@ cat > env-file << 'EOF'
5454
export LFMP_ARCH=x86_64 # or "aarch64" if running on ARM64
5555
export LFMP_VERSION=1.4.0
5656
export LFMP_PACKAGE_ITERATION=7
57-
export LFMP_TARGET_DISTROS="debian13 rocky10" # "debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 ubuntu2004 ubuntu2204 ubuntu2404"
57+
export LFMP_TARGET_DISTROS="debian13 rocky10" # "debian11 debian12 debian13 rocky8 rocky9 rocky10 sle15 sle16 ubuntu2004 ubuntu2204 ubuntu2404"
5858
5959
# ---
6060
# Constants
@@ -141,6 +141,7 @@ RHEL 8 ! docker.io/rockylinux/rockylinux:8
141141
RHEL 9 ! docker.io/rockylinux/rockylinux:9
142142
RHEL 10 ! docker.io/rockylinux/rockylinux:10
143143
SLE 15 ! registry.suse.com/suse/sle15:15.5
144+
SLE 16 ! registry.suse.com/bci/bci-base:16.0
144145
Ubuntu 20.04 ! docker.io/library/ubuntu:20.04
145146
Ubuntu 22.04 ! docker.io/library/ubuntu:22.04
146147
Ubuntu 24.04 ! docker.io/library/ubuntu:24.04

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
Build, CI/CD:
1414

1515
* Add support for sle15 packages
16+
* Add support for sle16 packages
1617

1718

1819
Monitoring Plugins:

build/containerfiles/sle16

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM registry.suse.com/bci/bci-base:16.0
2+
3+
# Install Python 3
4+
RUN zypper --non-interactive install --no-recommends gcc python3 python3-pip python3-devel && \
5+
zypper --non-interactive clean --all
6+
7+
RUN zypper --non-interactive install --no-recommends rpm-build && \
8+
zypper --non-interactive clean --all

build/create-package.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# 2025101701
2+
# 2026031301
33

44
set -e -o pipefail -u -x
55

@@ -29,6 +29,13 @@ rocky9 | rocky10)
2929
sle15)
3030
export LFMP_PYTHON=python3.11
3131

32+
bash $LFMP_DIR_REPOS/monitoring-plugins/build/create-src-tarball.sh
33+
bash $LFMP_DIR_REPOS/monitoring-plugins/build/create-vendor-tarball.sh
34+
bash $LFMP_DIR_REPOS/monitoring-plugins/build/create-rpm.sh $LFMP_DIR_REPOS/monitoring-plugins/build/linuxfabrik-monitoring-plugins.sle.spec
35+
;;
36+
sle16)
37+
export LFMP_PYTHON=python3
38+
3239
bash $LFMP_DIR_REPOS/monitoring-plugins/build/create-src-tarball.sh
3340
bash $LFMP_DIR_REPOS/monitoring-plugins/build/create-vendor-tarball.sh
3441
bash $LFMP_DIR_REPOS/monitoring-plugins/build/create-rpm.sh $LFMP_DIR_REPOS/monitoring-plugins/build/linuxfabrik-monitoring-plugins.sle.spec

build/linuxfabrik-monitoring-plugins.sle.spec

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,16 @@ Packager: info@linuxfabrik.ch
1010
Source0: https://github.com/Linuxfabrik/monitoring-plugins/archive/refs/tags/v%{version}.tar.gz
1111
Source1: vendor.tar.gz
1212

13-
BuildRequires: python311, python311-devel, python311-pip
14-
Requires: python311
15-
13+
%if 0%{suse_version} < 1600
14+
%define python_build_deps python311, python311-devel, python311-pip
15+
%define python_deps python311
16+
%else
17+
%define python_build_deps python3 >= 3.9, python3-devel, python3-pip
18+
%define python_deps python3 >= 3.9
19+
%endif
20+
21+
BuildRequires: %{python_build_deps}
22+
Requires: %{python_deps}
1623

1724
%description
1825
This Enterprise Class Check Plugin Collection offers a bunch of Nagios-compatible check plugins for Icinga, Naemon, Nagios, OP5, Shinken, Sensu and other monitoring applications. Each plugin is a stand-alone command line tool that provides a specific type of check. Typically, your monitoring software will run these check plugins to determine the current status of hosts and services on your network.

0 commit comments

Comments
 (0)