test: move container/ into test/

Move the container directory, containing the container definitions
for all the test containers, to test/, where all the other test-
related files are located (with the exception of `Schutzbot`).
Use `test/build-container.sh` to build the container, instead of
replicating that in `test-integration.sh`.
This commit is contained in:
Christian Kellner 2020-09-28 15:05:23 +02:00 committed by Tom Gundersen
parent b625f96c2b
commit aa8513c20d
19 changed files with 24 additions and 25 deletions

View file

@ -11,8 +11,8 @@ source /etc/os-release
podman build \
-t koji.hub \
-f container/hub/Dockerfile.${ID} .
-f test/container/hub/Dockerfile.${ID} .
podman build -t \
koji.builder \
-f container/builder/Dockerfile.${ID} .
-f test/container/builder/Dockerfile.${ID} .

View file

@ -13,9 +13,9 @@ RUN dnf -y upgrade \
python3-requests \
&& dnf clean all
COPY container/builder/kojid.conf /etc/kojid/kojid.conf
COPY test/container/builder/kojid.conf /etc/kojid/kojid.conf
COPY plugins/builder/osbuild.py /usr/lib/koji-builder-plugins/
COPY container/builder/run-kojid.sh /app/run-kojid.sh
COPY container/builder/osbuild.krb5.conf /etc/krb5.conf.d/
COPY test/container/builder/run-kojid.sh /app/run-kojid.sh
COPY test/container/builder/osbuild.krb5.conf /etc/krb5.conf.d/
ENTRYPOINT /app/run-kojid.sh

View file

@ -1,7 +1,7 @@
FROM registry.access.redhat.com/ubi8/ubi:latest
COPY container/rhel.repo /etc/yum.repos.d/
COPY container/brew.repo /etc/yum.repos.d/
COPY test/container/rhel.repo /etc/yum.repos.d/
COPY test/container/brew.repo /etc/yum.repos.d/
RUN dnf -y upgrade \
&& dnf -y \
@ -14,9 +14,9 @@ RUN dnf -y upgrade \
python3-requests \
&& dnf clean all
COPY container/builder/kojid.conf /etc/kojid/kojid.conf
COPY test/container/builder/kojid.conf /etc/kojid/kojid.conf
COPY plugins/builder/osbuild.py /usr/lib/koji-builder-plugins/
COPY container/builder/run-kojid.sh /app/run-kojid.sh
COPY container/builder/osbuild.krb5.conf /etc/krb5.conf.d/
COPY test/container/builder/run-kojid.sh /app/run-kojid.sh
COPY test/container/builder/osbuild.krb5.conf /etc/krb5.conf.d/
ENTRYPOINT /app/run-kojid.sh

View file

@ -9,12 +9,12 @@ RUN dnf -y upgrade \
python3-jsonschema \
&& dnf clean all
COPY container/hub/hub.conf /etc/koji-hub/hub.conf
COPY container/hub/ssl.conf /etc/httpd/conf.d/ssl.conf
COPY test/container/hub/hub.conf /etc/koji-hub/hub.conf
COPY test/container/hub/ssl.conf /etc/httpd/conf.d/ssl.conf
COPY plugins/hub/osbuild.py /usr/lib/koji-hub-plugins/
COPY container/hub/run-hub.sh /app/run-hub.sh
COPY test/container/hub/run-hub.sh /app/run-hub.sh
COPY container/hub/web.conf /etc/kojiweb/web.conf
COPY container/hub/kojiweb.conf /etc/httpd/conf.d/kojiweb.conf
COPY test/container/hub/web.conf /etc/kojiweb/web.conf
COPY test/container/hub/kojiweb.conf /etc/httpd/conf.d/kojiweb.conf
ENTRYPOINT /app/run-hub.sh

View file

@ -1,7 +1,7 @@
FROM registry.access.redhat.com/ubi8/ubi:latest
COPY container/rhel.repo /etc/yum.repos.d/
COPY container/brew.repo /etc/yum.repos.d/
COPY test/container/rhel.repo /etc/yum.repos.d/
COPY test/container/brew.repo /etc/yum.repos.d/
# koji db schema is in docs, remove nodocs from from dnf config
RUN sed -i '/^tsflags=nodocs$/d' /etc/dnf/dnf.conf
@ -18,12 +18,12 @@ RUN dnf -y upgrade \
python3-jsonschema \
&& dnf clean all
COPY container/hub/hub.conf /etc/koji-hub/hub.conf
COPY container/hub/ssl.conf /etc/httpd/conf.d/ssl.conf
COPY test/container/hub/hub.conf /etc/koji-hub/hub.conf
COPY test/container/hub/ssl.conf /etc/httpd/conf.d/ssl.conf
COPY plugins/hub/osbuild.py /usr/lib/koji-hub-plugins/
COPY container/hub/run-hub.sh /app/run-hub.sh
COPY test/container/hub/run-hub.sh /app/run-hub.sh
COPY container/hub/web.conf /etc/kojiweb/web.conf
COPY container/hub/kojiweb.conf /etc/httpd/conf.d/kojiweb.conf
COPY test/container/hub/web.conf /etc/kojiweb/web.conf
COPY test/container/hub/kojiweb.conf /etc/httpd/conf.d/kojiweb.conf
ENTRYPOINT /app/run-hub.sh

View file

@ -43,8 +43,7 @@ greenprint "Creating composer SSL certificates"
sudo test/make-certs.sh
greenprint "Building containers"
sudo podman build -t koji.hub -f container/hub/Dockerfile.${ID} .
sudo podman build -t koji.builder -f container/builder/Dockerfile.${ID} .
sudo test/build-container.sh
greenprint "Starting containers"
sudo test/run-koji-container.sh start

View file

@ -28,7 +28,7 @@ builder_start() {
--name org.osbuild.koji.builder --network org.osbuild.koji \
-v "${SHARE_DIR}:/share:z" \
-v "${DATA_DIR}:/mnt:z" \
-v "${PWD}/container/builder/osbuild-koji.conf:/etc/koji-osbuild/builder.conf:z" \
-v "${PWD}/test/container/builder/osbuild-koji.conf:/etc/koji-osbuild/builder.conf:z" \
--hostname org.osbuild.koji.kojid \
--add-host=composer:${GATEWAY_IP} \
koji.builder