Skip to content

Commit

Permalink
Update dockerfiles for CiCd
Browse files Browse the repository at this point in the history
  • Loading branch information
benlabbe committed Oct 6, 2023
1 parent da92b77 commit d504a30
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
DIST/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


# Folders
DIST/
build/
pack/
lib
Expand Down
24 changes: 24 additions & 0 deletions Dockerfile-debian11
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM debian:11

ARG TRAVIS_JOB_NUMBER

# 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
RUN mkdir -p /src/
RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver

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 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
RUN echo "export filename=\${fullname%.*}" >> /envfile
RUN . /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-debian11.deb"

## install github-release to be able to deploy packages
#RUN wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && tar xjf linux-amd64-github-release.tar.bz2 && cp bin/linux/amd64/github-release /usr/bin
10 changes: 7 additions & 3 deletions Dockerfile-debian9.4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG TRAVIS_JOB_NUMBER

# Setup
RUN apt-get update -y -qq
RUN apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qt5-default qtbase5-dev-tools qtdeclarative5-dev -qq
RUN apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qt5-default qtbase5-dev-tools qtdeclarative5-dev packaging-dev -qq
RUN mkdir -p /src/
RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver

Expand All @@ -13,8 +13,12 @@ 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 package
RUN install -D /src/qhttpserver/build/qhttpserver-0.0.1-Linux.deb /usr/share/apps/qhttpserver/packages/qhttpserver-0.0.1-debian9.4.deb
RUN ninja all && ninja test && ninja package
RUN packagefile=$(find /src/qhttpserver/build/*.deb) \
fullname=$(basename -- "$packagefile") \
extension="${fullname##*.}" \
filename="${fullname%.*}" \
install -D $packagefile /usr/share/apps/qhttpserver/packages/$filename-debian9.4.deb

## install github-release to be able to deploy packages
#RUN wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && tar xjf linux-amd64-github-release.tar.bz2 && cp bin/linux/amd64/github-release /usr/bin
9 changes: 7 additions & 2 deletions Dockerfile-ubuntu14.04
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG TRAVIS_JOB_NUMBER

# Setup
RUN apt-get update -y -qq
RUN apt-get install -y apt-utils git gcc g++ cmake cmake-data ninja-build qt5-default qtbase5-dev-tools qtdeclarative5-dev -qq
RUN apt-get install -y apt-utils git gcc g++ cmake cmake-data ninja-build qtbase5-dev-tools qtdeclarative5-dev packaging-dev -qq
RUN mkdir -p /src/
RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver

Expand All @@ -14,4 +14,9 @@ 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 package
RUN ninja all && ninja test && 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
RUN echo "export filename=\${fullname%.*}" >> /envfile
RUN . /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-ubuntu14.04.deb"
10 changes: 7 additions & 3 deletions Dockerfile-ubuntu16.04
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG TRAVIS_JOB_NUMBER

# Setup
RUN apt-get update -y -qq
RUN apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qt5-default qtbase5-dev-tools qtdeclarative5-dev -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
RUN mkdir -p /src/
RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver

Expand All @@ -13,8 +13,12 @@ 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 package
RUN install -D /src/qhttpserver/build/qhttpserver-0.0.1-Linux.deb /usr/share/apps/qhttpserver/packages/qhttpserver-0.0.1-ubuntu16.04.deb
RUN ninja all && ninja test && 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
RUN echo "export filename=\${fullname%.*}" >> /envfile
RUN . /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-ubuntu16.04.deb"

## install github-release to be able to deploy packages
#RUN wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && tar xjf linux-amd64-github-release.tar.bz2 && cp bin/linux/amd64/github-release /usr/bin
Expand Down
12 changes: 8 additions & 4 deletions Dockerfile-ubuntu18.04
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:18.04
FROM ubuntu:22.04

# Setup
RUN apt-get update -y -qq
RUN apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qt5-default qtbase5-dev-tools qtdeclarative5-dev -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
RUN mkdir -p /src/
RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver

Expand All @@ -11,8 +11,12 @@ 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 package
RUN install -D /src/qhttpserver/build/qhttpserver-0.0.1-Linux.deb /usr/share/apps/qhttpserver/packages/qhttpserver-0.0.1-ubuntu18.04.deb
RUN ninja all && ninja test && 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
RUN echo "export filename=\${fullname%.*}" >> /envfile
RUN . /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-ubuntu18.04.deb"

## install github-release to be able to deploy packages
#RUN wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && tar xjf linux-amd64-github-release.tar.bz2 && cp bin/linux/amd64/github-release /usr/bin
Expand Down
23 changes: 23 additions & 0 deletions Dockerfile-ubuntu22.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:22.04

# 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
RUN mkdir -p /src/
RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver

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 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
RUN echo "export filename=\${fullname%.*}" >> /envfile
RUN . /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-ubuntu22.04.deb"

## install github-release to be able to deploy packages
#RUN wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && tar xjf linux-amd64-github-release.tar.bz2 && cp bin/linux/amd64/github-release /usr/bin

1 change: 0 additions & 1 deletion QHttpServerConfig-src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ set(QHTTPSERVER_VERSION "${QHTTPSERVER_VERSION_MAJOR}.${QHTTPSERVER_VERSION_MINO
set(QHTTPSERVER_GENERIC_LIB_VERSION ${QHTTPSERVER_VERSION})
set(QHTTPSERVER_GENERIC_LIB_SOVERSION ${QHTTPSERVER_VERSION_MINOR})


message(STATUS "QHttpServer version ${QHTTPSERVER_VERSION} - QHTTPSERVER_GENERIC_LIB_VERSION ${QHTTPSERVER_GENERIC_LIB_VERSION} ")

0 comments on commit d504a30

Please sign in to comment.