From 40d21e5d72246946c2e9480c84df810af637b0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Labb=C3=A9?= Date: Fri, 6 Oct 2023 11:53:51 +0200 Subject: [PATCH] updatre dockerfile for CiCd --- CMakeLists.txt | 7 ++++--- Dockerfile-debian11 | 3 ++- Dockerfile-debian9.4 | 3 ++- Dockerfile-ubuntu14.04 | 1 + Dockerfile-ubuntu16.04 | 1 + Dockerfile-ubuntu18.04 | 2 ++ Dockerfile-ubuntu22.04 | 4 +++- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea5e192..3fdd450 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,9 +173,10 @@ SET(CPACK_PACKAGE_VERSION "${QHTTPSERVER_VERSION}") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "qhttpserver-${QHTTPSERVER_VERSION}") #SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") #SET(CPACK_NSIS_MODIFY_PATH "ON") -SET(CPACK_STRIP_FILES "") -SET(CPACK_SOURCE_STRIP_FILES "") -SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +#SET(CPACK_STRIP_FILES "") +#SET(CPACK_SOURCE_STRIP_FILES "") +#SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) +#SET(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS OFF) SET(CPACK_GENERATOR ${SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR}) # set(CPACK_RPM_PACKAGE_REQUIRES "qt5 >= 5.2") # SET(CPACK_DEBIAN_PACKAGE_DEPENDS "") diff --git a/Dockerfile-debian11 b/Dockerfile-debian11 index da8aade..9269717 100644 --- a/Dockerfile-debian11 +++ b/Dockerfile-debian11 @@ -1,6 +1,7 @@ FROM debian:11 -ARG TRAVIS_JOB_NUMBER +ARG TRAVIS_JOB_NUMBER +ENV DEBIAN_FRONTEND=noninteractive # Setup RUN apt-get update -y -qq diff --git a/Dockerfile-debian9.4 b/Dockerfile-debian9.4 index b3e8750..3af07b3 100644 --- a/Dockerfile-debian9.4 +++ b/Dockerfile-debian9.4 @@ -1,6 +1,7 @@ FROM debian:9.4 -ARG TRAVIS_JOB_NUMBER +ARG TRAVIS_JOB_NUMBER +ENV DEBIAN_FRONTEND=noninteractive # Setup RUN apt-get update -y -qq diff --git a/Dockerfile-ubuntu14.04 b/Dockerfile-ubuntu14.04 index 6e25713..9a94b8a 100644 --- a/Dockerfile-ubuntu14.04 +++ b/Dockerfile-ubuntu14.04 @@ -2,6 +2,7 @@ FROM ubuntu:14.04 ARG BINTRAYKEY ARG TRAVIS_JOB_NUMBER +ENV DEBIAN_FRONTEND=noninteractive # Setup RUN apt-get update -y -qq diff --git a/Dockerfile-ubuntu16.04 b/Dockerfile-ubuntu16.04 index a97f89d..7dded55 100644 --- a/Dockerfile-ubuntu16.04 +++ b/Dockerfile-ubuntu16.04 @@ -1,6 +1,7 @@ FROM ubuntu:16.04 ARG TRAVIS_JOB_NUMBER +ENV DEBIAN_FRONTEND=noninteractive # Setup RUN apt-get update -y -qq diff --git a/Dockerfile-ubuntu18.04 b/Dockerfile-ubuntu18.04 index ee85fef..a2b4d46 100644 --- a/Dockerfile-ubuntu18.04 +++ b/Dockerfile-ubuntu18.04 @@ -1,5 +1,7 @@ FROM ubuntu:22.04 +ENV DEBIAN_FRONTEND=noninteractive + # Setup RUN apt-get update -y -qq RUN apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qtbase5-dev-tools qtdeclarative5-dev- packaging-dev -qq diff --git a/Dockerfile-ubuntu22.04 b/Dockerfile-ubuntu22.04 index b53defe..0cefad9 100644 --- a/Dockerfile-ubuntu22.04 +++ b/Dockerfile-ubuntu22.04 @@ -1,5 +1,7 @@ FROM ubuntu:22.04 +ENV DEBIAN_FRONTEND=noninteractive + # Setup RUN apt-get update -y -qq RUN apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qtbase5-dev-tools qtdeclarative5-dev packaging-dev -qq @@ -11,7 +13,7 @@ RUN mkdir -p /src/qhttpserver/build # Build WORKDIR /src/qhttpserver/build RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. -RUN ninja all && ninja test && ninja package +RUN ninja all && ninja package RUN echo "export packagefile=`find /src/qhttpserver/build/ -maxdepth 1 -name *.deb`" > /envfile RUN echo "export fullname=\$(basename -- \$packagefile)" >> /envfile RUN echo "export extension=\${fullname##*.}" >> /envfile