Skip to content
Snippets Groups Projects
Verified Commit 562573d2 authored by Petr Špaček's avatar Petr Špaček
Browse files

CI: add Lua lint

parent e95643d1
No related branches found
No related tags found
1 merge request!402CI: add Lua lint and installcheck tests
image: cznic/ci-debian-kresd
image: cznic/ci-debian-kresd:beta
variables:
DEBIAN_FRONTEND: noninteractive
......@@ -17,6 +17,14 @@ build:linux:amd64:
- linux
- amd64
lint:lua:
stage: test
dependencies: [] # do not download build artifacts
script:
- make lint
tags:
- docker
test:linux:amd64:
stage: test
script:
......
......@@ -4,36 +4,54 @@ MAINTAINER Knot DNS <knot-dns@labs.nic.cz>
WORKDIR /root
CMD ["/bin/bash"]
# name: cznic/ci-debian-kresd
# install dependecies
# generic cleanup
RUN apt-get update -qq
RUN apt-get install -y -qqq apt-utils
RUN apt-get upgrade -y -qqq
RUN apt-get install -y -qqq make cmake pkg-config git build-essential bsdmainutils libtool autoconf make pkg-config liburcu-dev libgnutls28-dev libedit-dev liblmdb-dev libcap-ng-dev libsystemd-dev libidn11-dev protobuf-c-compiler libfstrm-dev pkg-config libknot-dev libuv1-dev libcmocka-dev libluajit-5.1-dev valgrind python3 python3-dev python3-jinja2 python3-pip python3-yaml libffi-dev libaugeas-dev python3-pep8 unzip wget lua-sec lua-socket
RUN apt-get purge python3-dnspython
# Knot and Knot Resolver dependecies
RUN apt-get install -y -qqq make cmake pkg-config git build-essential bsdmainutils libtool autoconf make pkg-config liburcu-dev libgnutls28-dev libedit-dev liblmdb-dev libcap-ng-dev libsystemd-dev libidn11-dev protobuf-c-compiler libfstrm-dev pkg-config libuv1-dev libcmocka-dev libluajit-5.1-dev lua-sec lua-socket
# Python: grab latest versions from PyPi
RUN apt-get install -y -qqq python3-pip wget
RUN pip3 install --upgrade pip
RUN pip3 install --user dnspython python-augeas
RUN pip3 install pylint
#install unbound
# C depedencies for python-augeas
RUN apt-get install -y -qqq libaugeas-dev libffi-dev
# Deckard depedencies
RUN wget https://gitlab.labs.nic.cz/knot/deckard/raw/master/requirements.txt -O /tmp/deckard-req.txt
RUN pip3 install -r /tmp/deckard-req.txt
# build and install latest version of Knot DNS
RUN git clone --depth=1 https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot
WORKDIR /tmp/knot
RUN pwd
RUN autoreconf -if
RUN ./configure
RUN make
RUN make install
RUN ldconfig
# Valgrind
RUN apt-get install valgrind -y -qqq
RUN wget https://raw.githubusercontent.com/LuaJIT/LuaJIT/v2.0.4/src/lj.supp -O /lj.supp
# TODO: rebuild LuaJIT with Valgrind support
# Lua lint
RUN apt-get install luarocks -y -qqq
RUN luarocks install luacheck
# respdiff
RUN pip3 install dnspython python-augeas
RUN git clone --depth=1 https://gitlab.labs.nic.cz/knot/resolver-benchmarking.git /tmp/resolver-benchmarking
RUN mv /tmp/resolver-benchmarking/response_differences/respdiff /var/opt/respdiff
RUN pip3 install -r /tmp/resolver-benchmarking/requirements.txt
RUN rm -rf /tmp/resolver-benchmarking
# Unbound for respdiff
RUN apt-get install unbound unbound-anchor -y -qqq
RUN printf "server:\n interface: 127.0.0.1@53535\n use-syslog: yes\nremote-control:\n control-enable: no\n" >> /etc/unbound/unbound.conf
#install bind
# BIND for respdiff
RUN apt-get install bind9 -y -qqq
RUN printf 'options {\n directory "/var/cache/bind";\n listen-on port 53533 { 127.0.0.1; };\n listen-on-v6 port 53533 { ::1; };\n};\n' > /etc/bind/named.conf.options
#download respdiff
RUN wget https://gitlab.labs.nic.cz/knot/resolver-benchmarking/repository/archive.zip -O respdiff.zip
RUN unzip respdiff.zip
RUN cp -R resolver-benchmarking*/response_differences/respdiff /var/opt/respdiff
RUN pip3 install -r resolver-benchmarking*/requirements.txt
RUN rm -rf respdiff.zip resolver-benchmarking*
#build knot
RUN git clone https://gitlab.labs.nic.cz/knot/knot-dns.git /tmp/knot
RUN cd /tmp/knot && autoreconf -if && ./configure && make && make install && ldconfig
#prepare for valgrind
RUN wget https://raw.githubusercontent.com/LuaDist/luajit/2.0.3/src/lj.supp -O /lj.supp
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment