From: Tomas Krizek Date: Fri, 27 Jul 2018 11:28:46 +0000 (+0200) Subject: ci: update dockerfiles to support different knot versions X-Git-Tag: v2.4.1~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8735e2a8d56037d27fab48e1bf92bc49a2ff8a8;p=thirdparty%2Fknot-resolver.git ci: update dockerfiles to support different knot versions --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8c400684..5cec39ba7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: $CI_REGISTRY/knot/knot-resolver/ci:debian-stable +image: $CI_REGISTRY/knot/knot-resolver/ci/debian-stable:knot-2.6 variables: DEBIAN_FRONTEND: noninteractive @@ -32,7 +32,7 @@ build:linux:amd64: build:clang:linux:amd64: stage: build - image: $CI_REGISTRY/knot/knot-resolver/ci:debian-unstable # newer Debian for newer Clang + image: $CI_REGISTRY/knot/knot-resolver/ci/debian-unstable:knot-2.6 # newer Debian for newer Clang script: - rm daemon/lua/kres-gen.lua - CXX=clang++-5.0 CC=clang-5.0 make -k all "CFLAGS=-Werror -Wno-error=unused-command-line-argument -ggdb" @@ -70,7 +70,7 @@ lint:lua: lint:c: stage: test - image: $CI_REGISTRY/knot/knot-resolver/ci:debian-unstable # newer Debian for newer Clang + image: $CI_REGISTRY/knot/knot-resolver/ci/debian-unstable:knot-2.6 # newer Debian for newer Clang dependencies: [] # do not download build artifacts script: - make lint-c CLANG_TIDY="clang-tidy-5.0 -quiet" @@ -80,7 +80,7 @@ lint:c: lint:clang-scan-build: allow_failure: true # for now it is just informative stage: test - image: $CI_REGISTRY/knot/knot-resolver/ci:debian-unstable # newer Debian for newer Clang + image: $CI_REGISTRY/knot/knot-resolver/ci/debian-unstable:knot-2.6 # newer Debian for newer Clang dependencies: [] # do not download build artifacts script: - MAKEFLAGS="-k -j$(nproc)" SCAN_BUILD="/usr/lib/llvm-5.0/bin/scan-build -o scan-results --status-bugs -no-failure-reports" ./tests/clang_scan_build.sh make diff --git a/ci/README.md b/ci/README.md new file mode 100644 index 000000000..7b495ae15 --- /dev/null +++ b/ci/README.md @@ -0,0 +1,14 @@ +Docker Build +------------ + +* debian-stable / debian-unstable + +``` +$ export KNOT_BRANCH=2.6 +$ docker build -t registry.labs.nic.cz/knot/knot-resolver/ci/debian-stable:knot-$KNOT_BRANCH --build-arg KNOT_BRANCH=$KNOT_BRANCH debian-stable +$ docker build -t registry.labs.nic.cz/knot/knot-resolver/ci/debian-unstable:knot-$KNOT_BRANCH --build-arg KNOT_BRANCH=$KNOT_BRANCH debian-unstable + +$ docker login registry.labs.nic.cz +$ docker push registry.labs.nic.cz/knot/knot-resolver/ci/debian-stable:knot-$KNOT_BRANCH +$ docker push registry.labs.nic.cz/knot/knot-resolver/ci/debian-unstable:knot-$KNOT_BRANCH +``` diff --git a/ci/debian-stable/Dockerfile b/ci/debian-stable/Dockerfile index 093744254..9aa700a80 100644 --- a/ci/debian-stable/Dockerfile +++ b/ci/debian-stable/Dockerfile @@ -1,5 +1,6 @@ FROM debian:stable MAINTAINER Knot Resolver +ARG KNOT_BRANCH=master WORKDIR /root CMD ["/bin/bash"] @@ -33,11 +34,11 @@ RUN pip3 install -r /tmp/deckard-req.txt # build and install latest version of Knot DNS # (kresd depends on libknot and libdnssec) -RUN git clone --depth=1 --branch=2.6 https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot +RUN git clone --depth=1 --branch=$KNOT_BRANCH https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot WORKDIR /tmp/knot RUN pwd RUN autoreconf -if -RUN ./configure +RUN ./configure --prefix=/usr RUN make RUN make install RUN ldconfig diff --git a/ci/debian-unstable/Dockerfile b/ci/debian-unstable/Dockerfile index 69a2932d7..3c473e89a 100644 --- a/ci/debian-unstable/Dockerfile +++ b/ci/debian-unstable/Dockerfile @@ -1,5 +1,6 @@ FROM debian:unstable MAINTAINER Knot Resolver +ARG KNOT_BRANCH=master WORKDIR /root CMD ["/bin/bash"] @@ -13,11 +14,11 @@ RUN apt-get install -y -qqq make cmake pkg-config git build-essential bsdmainuti # build and install latest version of Knot DNS # (kresd depends on libknot and libdnssec) -RUN git clone --depth=1 --branch=2.6 https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot +RUN git clone --depth=1 --branch=$KNOT_BRANCH https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot WORKDIR /tmp/knot RUN pwd RUN autoreconf -if -RUN ./configure +RUN ./configure --prefix=/usr RUN make RUN make install RUN ldconfig