From 2dc90445bb870d32ed68bbcc27a1b43d9cc353f0 Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Oct 07 2019 20:55:51 +0000 Subject: docker: fix the tito command for building packages without running tests There are two ways to build a package without running tests: 1) Using --rpmbuild-options='--without=check' which is currently in our Dockerfiles. The problem here is, that the spec file needs to support it, e.g. %check %if %{with check} ./run_tests.sh %endif Not all of our packages do this. For example copr-backend doesn't. 2) Using --rpmbuild-options='--nocheck' which works in all cases. Therefore, I switching to it. --- diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 2811d90..0b907a9 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -70,7 +70,7 @@ RUN dnf -y builddep /copr/backend/*.spec --allowerasing && \ # build packages from sources RUN cd /copr/backend && \ - tito build --rpm --test --rpmbuild-options='--without=check' + tito build --rpm --test --rpmbuild-options='--nocheck' # upgrade the already pre-installed packages if possible RUN dnf -y upgrade /tmp/tito/noarch/copr-backend*.noarch.rpm ; \ diff --git a/docker/builder/Dockerfile b/docker/builder/Dockerfile index aae3cfe..f732801 100644 --- a/docker/builder/Dockerfile +++ b/docker/builder/Dockerfile @@ -48,7 +48,7 @@ RUN echo 'root:passwd' | chpasswd && \ RUN cd /copr/rpmbuild && \ dnf builddep -y *spec && \ - tito build --rpm --test --rpmbuild-options='--without=check' && \ + tito build --rpm --test --rpmbuild-options='--nocheck' && \ dnf -y install /tmp/tito/x86_64/copr-{rpmbuild,builder}*.x86_64.rpm --allowerasing && \ dnf clean all diff --git a/docker/distgit/Dockerfile b/docker/distgit/Dockerfile index 8e0f290..d4aa7fb 100644 --- a/docker/distgit/Dockerfile +++ b/docker/distgit/Dockerfile @@ -23,7 +23,7 @@ COPY docker/distgit/files/ / RUN cd /copr/dist-git && \ dnf builddep -y *spec && \ - tito build --rpm --test --rpmbuild-options='--without=check' && \ + tito build --rpm --test --rpmbuild-options='--nocheck' && \ ( dnf -y install /tmp/tito/noarch/copr-dist-git*.noarch.rpm || true ) && \ dnf clean all diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index e79385b..04e25d2 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -28,7 +28,7 @@ COPY docker/frontend/files/ / # build and install copr-frontend RUN cd /copr/frontend && \ dnf builddep -y *spec && \ - tito build --rpm --test --rpmbuild-options='--without=check' && \ + tito build --rpm --test --rpmbuild-options='--nocheck' && \ ( dnf -y install /tmp/tito/noarch/copr-frontend*.noarch.rpm || true ) && \ dnf clean all