ClickHouse/docker/test/pvs/Dockerfile

49 lines
2.2 KiB
Docker
Raw Normal View History

2021-09-06 11:33:39 +00:00
# docker build -t clickhouse/pvs-test .
2019-06-04 13:01:16 +00:00
2021-09-06 11:33:39 +00:00
FROM clickhouse/binary-builder
2019-04-16 13:29:48 +00:00
RUN apt-get update --yes \
&& apt-get install \
bash \
wget \
software-properties-common \
gpg-agent \
debsig-verify \
strace \
protobuf-compiler \
protobuf-compiler-grpc \
libprotoc-dev \
libgrpc++-dev \
libc-ares-dev \
--yes --no-install-recommends
2019-04-16 13:29:48 +00:00
#RUN wget -nv -O - http://files.viva64.com/etc/pubkey.txt | sudo apt-key add -
#RUN sudo wget -nv -O /etc/apt/sources.list.d/viva64.list http://files.viva64.com/etc/viva64.list
2019-05-13 10:06:51 +00:00
#
#RUN apt-get --allow-unauthenticated update -y \
# && env DEBIAN_FRONTEND=noninteractive \
# apt-get --allow-unauthenticated install --yes --no-install-recommends \
# pvs-studio
2019-04-16 13:29:48 +00:00
ENV PKG_VERSION="pvs-studio-latest"
2019-05-13 10:06:51 +00:00
RUN set -x \
2021-09-04 13:00:42 +00:00
&& export PUBKEY_HASHSUM="ad369a2e9d8b8c30f5a9f2eb131121739b79c78e03fef0f016ea51871a5f78cd4e6257b270dca0ac3be3d1f19d885516" \
&& wget -nv https://files.viva64.com/etc/pubkey.txt -O /tmp/pubkey.txt \
&& echo "${PUBKEY_HASHSUM} /tmp/pubkey.txt" | sha384sum -c \
&& apt-key add /tmp/pubkey.txt \
&& wget -nv "https://files.viva64.com/${PKG_VERSION}.deb" \
&& { debsig-verify ${PKG_VERSION}.deb \
|| echo "WARNING: Some file was just downloaded from the internet without any validation and we are installing it into the system"; } \
&& dpkg -i "${PKG_VERSION}.deb"
2019-04-16 13:29:48 +00:00
2021-09-17 11:17:50 +00:00
ENV CCACHE_DIR=/test_output/ccache
2021-09-17 10:34:45 +00:00
2021-09-17 10:41:29 +00:00
CMD echo "Running PVS version $PKG_VERSION" && mkdir -p $CCACHE_DIR && cd /repo_folder && pvs-studio-analyzer credentials $LICENCE_NAME $LICENCE_KEY -o ./licence.lic \
2021-09-08 22:38:22 +00:00
&& cmake . -D"ENABLE_EMBEDDED_COMPILER"=OFF -D"USE_INTERNAL_PROTOBUF_LIBRARY"=OFF -D"USE_INTERNAL_GRPC_LIBRARY"=OFF -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang\+\+-13 \
&& ninja re2_st clickhouse_grpc_protos \
&& pvs-studio-analyzer analyze -o pvs-studio.log -e contrib -j 4 -l ./licence.lic; \
2021-04-23 18:58:37 +00:00
cp /repo_folder/pvs-studio.log /test_output; \
2019-04-16 13:29:48 +00:00
plog-converter -a GA:1,2 -t fullhtml -o /test_output/pvs-studio-html-report pvs-studio.log; \
plog-converter -a GA:1,2 -t tasklist -o /test_output/pvs-studio-task-report.txt pvs-studio.log