From 5652bf1ebd7e086f6e7edcb4b22d76392d5c595f Mon Sep 17 00:00:00 2001
From: Henrik Triem <henrik.triem@netways.de>
Date: Wed, 14 Jul 2021 15:04:11 +0200
Subject: [PATCH] Add support for OpenSuse 15.3

---
 .gitlab-ci.yml  |  3 +++
 15.3/Dockerfile | 36 ++++++++++++++++++++++++++++++++++++
 15.3/Makefile   |  2 ++
 Makefile        |  2 ++
 4 files changed, 43 insertions(+)
 create mode 100644 15.3/Dockerfile
 create mode 100644 15.3/Makefile

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7fcdc5a..06e51c3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,5 +18,8 @@ before_script:
     - make -C ${CI_JOB_NAME}
     - '[ "$CI_COMMIT_REF_NAME" != master ] || make -C ${CI_JOB_NAME} push'
 
+'15.3':
+  <<: *build_job
+
 '15.2':
   <<: *build_job
diff --git a/15.3/Dockerfile b/15.3/Dockerfile
new file mode 100644
index 0000000..fce1ae7
--- /dev/null
+++ b/15.3/Dockerfile
@@ -0,0 +1,36 @@
+FROM opensuse/leap:15.3
+
+RUN zypper refresh -f \
+ && zypper update -y \
+ && zypper clean
+
+RUN zypper --non-interactive install --no-recommends \
+  sudo wget curl which tar expect git \
+  make patch rpm-build rpmlint \
+ && zypper clean
+
+RUN zypper --non-interactive install --no-recommends \
+  cmake libopenssl-devel ccache \
+ && zypper clean
+
+RUN OBS_DIST=openSUSE_Leap_15.3 \
+ && zypper --non-interactive addrepo https://download.opensuse.org/repositories/home:/icinga/"${OBS_DIST}"/home:icinga.repo \
+ && zypper --gpg-auto-import-keys --non-interactive install spectool createrepo \
+ && zypper clean -a
+
+RUN rpm --import https://packages.icinga.com/icinga.key \
+ && zypper --non-interactive addrepo --refresh https://packages.icinga.com/openSUSE/ICINGA-release.repo \
+ && zypper --non-interactive refresh \
+ && zypper clean -a
+
+RUN groupadd -g 1000 build \
+ && useradd -u 1000 -g 1000 -m build \
+ && echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
+ && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
+ && chown build.build /usr/local/bin
+
+RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
+RUN icinga-provide-go
+USER build
+ENTRYPOINT ["/usr/local/bin/icinga-build-entrypoint"]
+CMD ["icinga-build-package"]
diff --git a/15.3/Makefile b/15.3/Makefile
new file mode 100644
index 0000000..f451fe1
--- /dev/null
+++ b/15.3/Makefile
@@ -0,0 +1,2 @@
+VARIANT := x86_64
+include ../image.mk
diff --git a/Makefile b/Makefile
index 55caed7..0c0f4dd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
 all:
 	$(MAKE) -C 15.2
+	$(MAKE) -C 15.3
 
 push:
 	$(MAKE) -C 15.2 push
+	$(MAKE) -C 15.3 push
-- 
GitLab