From d6917aaef6ac6c34359026c40cdc69c2e3645e10 Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Pla Date: Wed, 26 Feb 2025 09:15:12 +0000 Subject: [PATCH] CI: add github build profiles To be used in the build container tests. Signed-off-by: Jordi Massaguer Pla --- .../profiles/github_runner/Docker/Dockerfile | 15 +++++++++++ .../github_runner/Docker/add_packages.sh | 15 +++++++++++ .../Docker/authprofile/Dockerfile | 19 ++++++++++++++ .../Docker/authprofile/add_packages.sh | 13 ++++++++++ .../Docker/authprofile/avahi-daemon.conf | 25 +++++++++++++++++++ .../Docker/authprofile/nsswitch.conf | 17 +++++++++++++ .../github_runner/Docker/avahi-daemon.conf | 25 +++++++++++++++++++ .../github_runner/Docker/nsswitch.conf | 17 +++++++++++++ .../Docker/serverhost/Dockerfile | 19 ++++++++++++++ .../Docker/serverhost/add_packages.sh | 13 ++++++++++ .../Docker/serverhost/avahi-daemon.conf | 25 +++++++++++++++++++ .../Docker/serverhost/nsswitch.conf | 17 +++++++++++++ 12 files changed, 220 insertions(+) create mode 100644 testsuite/features/profiles/github_runner/Docker/Dockerfile create mode 100755 testsuite/features/profiles/github_runner/Docker/add_packages.sh create mode 100644 testsuite/features/profiles/github_runner/Docker/authprofile/Dockerfile create mode 100755 testsuite/features/profiles/github_runner/Docker/authprofile/add_packages.sh create mode 100644 testsuite/features/profiles/github_runner/Docker/authprofile/avahi-daemon.conf create mode 100644 testsuite/features/profiles/github_runner/Docker/authprofile/nsswitch.conf create mode 100644 testsuite/features/profiles/github_runner/Docker/avahi-daemon.conf create mode 100644 testsuite/features/profiles/github_runner/Docker/nsswitch.conf create mode 100644 testsuite/features/profiles/github_runner/Docker/serverhost/Dockerfile create mode 100755 testsuite/features/profiles/github_runner/Docker/serverhost/add_packages.sh create mode 100644 testsuite/features/profiles/github_runner/Docker/serverhost/avahi-daemon.conf create mode 100644 testsuite/features/profiles/github_runner/Docker/serverhost/nsswitch.conf diff --git a/testsuite/features/profiles/github_runner/Docker/Dockerfile b/testsuite/features/profiles/github_runner/Docker/Dockerfile new file mode 100644 index 000000000000..3286c7c4dd8a --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/Dockerfile @@ -0,0 +1,15 @@ +FROM localhost:5002/opensuse/leap:15.4 +MAINTAINER Admin User "noemail@example.com" + +ARG repo +ARG cert + +RUN echo "$cert" > /etc/pki/trust/anchors/RHN-ORG-TRUSTED-SSL-CERT.pem +RUN update-ca-certificates +RUN echo "$repo" > /etc/zypp/repos.d/susemanager:dockerbuild.repo + +ADD nsswitch.conf /etc/nsswitch.conf +ADD avahi-daemon.conf /root/avahi-daemon.conf + +ADD add_packages.sh /root/add_packages.sh +RUN /root/add_packages.sh diff --git a/testsuite/features/profiles/github_runner/Docker/add_packages.sh b/testsuite/features/profiles/github_runner/Docker/add_packages.sh new file mode 100755 index 000000000000..62453fde70af --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/add_packages.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e + +cp /root/avahi-daemon.conf /etc/avahi/avahi-daemon.conf +/usr/sbin/avahi-daemon -D + +# do the real test +zypper --non-interactive --gpg-auto-import-keys ref +zypper --non-interactive in + +zypper --non-interactive in hoag-dummy orion-dummy +zypper --non-interactive up milkyway-dummy + +# kill avahi +/usr/sbin/avahi-daemon -k diff --git a/testsuite/features/profiles/github_runner/Docker/authprofile/Dockerfile b/testsuite/features/profiles/github_runner/Docker/authprofile/Dockerfile new file mode 100644 index 000000000000..44d036b07358 --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/authprofile/Dockerfile @@ -0,0 +1,19 @@ +# Container used to test Content Management feature +# +# VERSION 1.0.0 + +FROM localhost:5001/cucutest/systemsmanagement/uyuni/master/docker/containers/uyuni-master-testsuite +MAINTAINER Michael Calmer "mc@suse.com" + +ARG repo +ARG cert + +RUN echo "$cert" > /etc/pki/trust/anchors/RHN-ORG-TRUSTED-SSL-CERT.pem +RUN update-ca-certificates +RUN echo "$repo" > /etc/zypp/repos.d/susemanager:dockerbuild.repo + +ADD nsswitch.conf /etc/nsswitch.conf +ADD avahi-daemon.conf /root/avahi-daemon.conf + +ADD add_packages.sh /root/add_packages.sh +RUN /root/add_packages.sh diff --git a/testsuite/features/profiles/github_runner/Docker/authprofile/add_packages.sh b/testsuite/features/profiles/github_runner/Docker/authprofile/add_packages.sh new file mode 100755 index 000000000000..b7b0d881bafa --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/authprofile/add_packages.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +cp /root/avahi-daemon.conf /etc/avahi/avahi-daemon.conf +/usr/sbin/avahi-daemon -D + +# do the real test +zypper --non-interactive --gpg-auto-import-keys ref +zypper --non-interactive in hoag-dummy orion-dummy +zypper --non-interactive up milkyway-dummy + +# kill avahi +/usr/sbin/avahi-daemon -k diff --git a/testsuite/features/profiles/github_runner/Docker/authprofile/avahi-daemon.conf b/testsuite/features/profiles/github_runner/Docker/authprofile/avahi-daemon.conf new file mode 100644 index 000000000000..4461a221b13c --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/authprofile/avahi-daemon.conf @@ -0,0 +1,25 @@ +[server] +host-name=container +domain-name=tf.local +use-ipv4=yes +use-ipv6=yes +ratelimit-interval-usec=1000000 +ratelimit-burst=1000 +enable-dbus=no + +[wide-area] +enable-wide-area=yes + +[publish] +publish-hinfo=no +publish-workstation=no + +[reflector] + +[rlimits] +rlimit-core=0 +rlimit-data=4194304 +rlimit-fsize=0 +rlimit-nofile=768 +rlimit-stack=4194304 +rlimit-nproc=3 diff --git a/testsuite/features/profiles/github_runner/Docker/authprofile/nsswitch.conf b/testsuite/features/profiles/github_runner/Docker/authprofile/nsswitch.conf new file mode 100644 index 000000000000..76fc8b1b9adf --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/authprofile/nsswitch.conf @@ -0,0 +1,17 @@ +passwd: compat +group: compat + +hosts: files mdns [NOTFOUND=return] dns +networks: files dns + +services: files +protocols: files +rpc: files +ethers: files +netmasks: files +netgroup: files nis +publickey: files + +bootparams: files +automount: files nis +aliases: files diff --git a/testsuite/features/profiles/github_runner/Docker/avahi-daemon.conf b/testsuite/features/profiles/github_runner/Docker/avahi-daemon.conf new file mode 100644 index 000000000000..4461a221b13c --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/avahi-daemon.conf @@ -0,0 +1,25 @@ +[server] +host-name=container +domain-name=tf.local +use-ipv4=yes +use-ipv6=yes +ratelimit-interval-usec=1000000 +ratelimit-burst=1000 +enable-dbus=no + +[wide-area] +enable-wide-area=yes + +[publish] +publish-hinfo=no +publish-workstation=no + +[reflector] + +[rlimits] +rlimit-core=0 +rlimit-data=4194304 +rlimit-fsize=0 +rlimit-nofile=768 +rlimit-stack=4194304 +rlimit-nproc=3 diff --git a/testsuite/features/profiles/github_runner/Docker/nsswitch.conf b/testsuite/features/profiles/github_runner/Docker/nsswitch.conf new file mode 100644 index 000000000000..76fc8b1b9adf --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/nsswitch.conf @@ -0,0 +1,17 @@ +passwd: compat +group: compat + +hosts: files mdns [NOTFOUND=return] dns +networks: files dns + +services: files +protocols: files +rpc: files +ethers: files +netmasks: files +netgroup: files nis +publickey: files + +bootparams: files +automount: files nis +aliases: files diff --git a/testsuite/features/profiles/github_runner/Docker/serverhost/Dockerfile b/testsuite/features/profiles/github_runner/Docker/serverhost/Dockerfile new file mode 100644 index 000000000000..ef5c11237682 --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/serverhost/Dockerfile @@ -0,0 +1,19 @@ +# Container used to test Content Management feature +# +# VERSION 1.0.0 + +FROM localhost:5002/cucutest/systemsmanagement/uyuni/master/docker/containers/uyuni-master-testsuite +MAINTAINER Michael Calmer "mc@suse.com" + +ARG repo +ARG cert + +RUN echo "$cert" > /etc/pki/trust/anchors/RHN-ORG-TRUSTED-SSL-CERT.pem +RUN update-ca-certificates +RUN echo "$repo" > /etc/zypp/repos.d/susemanager:dockerbuild.repo + +ADD nsswitch.conf /etc/nsswitch.conf +ADD avahi-daemon.conf /root/avahi-daemon.conf + +ADD add_packages.sh /root/add_packages.sh +RUN /root/add_packages.sh diff --git a/testsuite/features/profiles/github_runner/Docker/serverhost/add_packages.sh b/testsuite/features/profiles/github_runner/Docker/serverhost/add_packages.sh new file mode 100755 index 000000000000..b7b0d881bafa --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/serverhost/add_packages.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +cp /root/avahi-daemon.conf /etc/avahi/avahi-daemon.conf +/usr/sbin/avahi-daemon -D + +# do the real test +zypper --non-interactive --gpg-auto-import-keys ref +zypper --non-interactive in hoag-dummy orion-dummy +zypper --non-interactive up milkyway-dummy + +# kill avahi +/usr/sbin/avahi-daemon -k diff --git a/testsuite/features/profiles/github_runner/Docker/serverhost/avahi-daemon.conf b/testsuite/features/profiles/github_runner/Docker/serverhost/avahi-daemon.conf new file mode 100644 index 000000000000..4461a221b13c --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/serverhost/avahi-daemon.conf @@ -0,0 +1,25 @@ +[server] +host-name=container +domain-name=tf.local +use-ipv4=yes +use-ipv6=yes +ratelimit-interval-usec=1000000 +ratelimit-burst=1000 +enable-dbus=no + +[wide-area] +enable-wide-area=yes + +[publish] +publish-hinfo=no +publish-workstation=no + +[reflector] + +[rlimits] +rlimit-core=0 +rlimit-data=4194304 +rlimit-fsize=0 +rlimit-nofile=768 +rlimit-stack=4194304 +rlimit-nproc=3 diff --git a/testsuite/features/profiles/github_runner/Docker/serverhost/nsswitch.conf b/testsuite/features/profiles/github_runner/Docker/serverhost/nsswitch.conf new file mode 100644 index 000000000000..76fc8b1b9adf --- /dev/null +++ b/testsuite/features/profiles/github_runner/Docker/serverhost/nsswitch.conf @@ -0,0 +1,17 @@ +passwd: compat +group: compat + +hosts: files mdns [NOTFOUND=return] dns +networks: files dns + +services: files +protocols: files +rpc: files +ethers: files +netmasks: files +netgroup: files nis +publickey: files + +bootparams: files +automount: files nis +aliases: files