Skip to content
Snippets Groups Projects
Commit f8735e2a authored by Tomas Krizek's avatar Tomas Krizek Committed by Petr Špaček
Browse files

ci: update dockerfiles to support different knot versions

parent ab483cb2
Branches
Tags
1 merge request!635ci: update dockerfiles to support different knot versions
Pipeline #38339 passed with warnings with stages
in 9 minutes and 23 seconds
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
......
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
```
FROM debian:stable
MAINTAINER Knot Resolver <knot-resolver@labs.nic.cz>
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
......
FROM debian:unstable
MAINTAINER Knot Resolver <knot-resolver@labs.nic.cz>
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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment