From 98b0e20a24af3af0e00d1ede9d0d4ee683119929 Mon Sep 17 00:00:00 2001
From: Noah Hilverling <noah.hilverling@icinga.com>
Date: Thu, 16 Apr 2020 12:30:42 +0200
Subject: [PATCH] Add eoan ermine

---
 .gitlab-ci.yml         |  3 +++
 Makefile               |  2 +-
 eoan/Makefile          |  1 +
 eoan/x86/Dockerfile    | 26 ++++++++++++++++++++++++++
 eoan/x86/Makefile      |  1 +
 eoan/x86_64/Dockerfile | 26 ++++++++++++++++++++++++++
 eoan/x86_64/Makefile   |  1 +
 7 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 eoan/Makefile
 create mode 100644 eoan/x86/Dockerfile
 create mode 100644 eoan/x86/Makefile
 create mode 100644 eoan/x86_64/Dockerfile
 create mode 100644 eoan/x86_64/Makefile

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 23f0c6a..3259741 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,6 +18,9 @@ before_script:
     - make -C ${CI_JOB_NAME}
     - '[ "$CI_COMMIT_REF_NAME" != master ] || make -C ${CI_JOB_NAME} push'
 
+eoan:
+  <<: *build_job
+
 disco:
   <<: *build_job
 
diff --git a/Makefile b/Makefile
index 7fd9e30..aa07d2a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-TARGETS := trusty xenial bionic disco
+TARGETS := trusty xenial bionic disco eoan
 TARGETS_PUSH := $(TARGETS:=-push)
 TARGETS_CLEAN := $(TARGETS:=-clean)
 
diff --git a/eoan/Makefile b/eoan/Makefile
new file mode 100644
index 0000000..5575b72
--- /dev/null
+++ b/eoan/Makefile
@@ -0,0 +1 @@
+include ../dist.mk
diff --git a/eoan/x86/Dockerfile b/eoan/x86/Dockerfile
new file mode 100644
index 0000000..3f7d179
--- /dev/null
+++ b/eoan/x86/Dockerfile
@@ -0,0 +1,26 @@
+FROM i386/ubuntu:eoan
+
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update \
+ && apt-get install -y eatmydata \
+ && eatmydata apt-get upgrade -y
+
+RUN eatmydata apt-get install -y \
+  sudo wget curl tar expect git \
+  devscripts build-essential lintian ccache pbuilder aptitude apt-utils
+
+RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
+ && DIST="$(lsb_release -sc)" \
+ && echo "deb http://packages.icinga.com/ubuntu icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list
+
+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
+
+USER build
+RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
+ENTRYPOINT ["/usr/local/bin/icinga-build-entrypoint"]
+CMD ["icinga-build-package"]
diff --git a/eoan/x86/Makefile b/eoan/x86/Makefile
new file mode 100644
index 0000000..15497f2
--- /dev/null
+++ b/eoan/x86/Makefile
@@ -0,0 +1 @@
+include ../../image.mk
diff --git a/eoan/x86_64/Dockerfile b/eoan/x86_64/Dockerfile
new file mode 100644
index 0000000..9ab8cdd
--- /dev/null
+++ b/eoan/x86_64/Dockerfile
@@ -0,0 +1,26 @@
+FROM ubuntu:eoan
+
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update \
+ && apt-get install -y eatmydata \
+ && eatmydata apt-get upgrade -y
+
+RUN eatmydata apt-get install -y \
+  sudo wget curl tar expect git \
+  devscripts build-essential lintian ccache pbuilder aptitude apt-utils
+
+RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
+ && DIST="$(lsb_release -sc)" \
+ && echo "deb http://packages.icinga.com/ubuntu icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list
+
+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
+
+USER build
+RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
+ENTRYPOINT ["/usr/local/bin/icinga-build-entrypoint"]
+CMD ["icinga-build-package"]
diff --git a/eoan/x86_64/Makefile b/eoan/x86_64/Makefile
new file mode 100644
index 0000000..15497f2
--- /dev/null
+++ b/eoan/x86_64/Makefile
@@ -0,0 +1 @@
+include ../../image.mk
-- 
GitLab