2021-09-06 11:33:39 +00:00
|
|
|
# docker build -t clickhouse/style-test .
|
2020-08-14 13:09:23 +00:00
|
|
|
FROM ubuntu:20.04
|
2022-01-13 20:40:21 +00:00
|
|
|
ARG ACT_VERSION=0.2.25
|
|
|
|
ARG ACTIONLINT_VERSION=1.6.8
|
2020-08-14 13:09:23 +00:00
|
|
|
|
2021-11-25 16:30:39 +00:00
|
|
|
# ARG for quick switch to a given ubuntu mirror
|
|
|
|
ARG apt_archive="http://archive.ubuntu.com"
|
|
|
|
RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list
|
2021-08-23 08:22:39 +00:00
|
|
|
|
2021-02-20 19:18:49 +00:00
|
|
|
RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
2022-01-13 20:40:21 +00:00
|
|
|
curl \
|
2021-02-20 19:18:49 +00:00
|
|
|
git \
|
2022-01-13 20:40:21 +00:00
|
|
|
libxml2-utils \
|
2021-02-20 19:18:49 +00:00
|
|
|
pylint \
|
2022-01-13 20:40:21 +00:00
|
|
|
python3-pip \
|
|
|
|
shellcheck \
|
2021-02-20 19:18:49 +00:00
|
|
|
yamllint \
|
2021-11-25 13:41:08 +00:00
|
|
|
&& pip3 install codespell PyGithub boto3 unidiff dohq-artifactory
|
2020-08-14 13:09:23 +00:00
|
|
|
|
2022-01-13 20:40:21 +00:00
|
|
|
# Architecture of the image when BuildKit/buildx is used
|
|
|
|
ARG TARGETARCH
|
|
|
|
|
|
|
|
# Get act and actionlint from releases
|
|
|
|
RUN arch=${TARGETARCH:-amd64} \
|
|
|
|
&& case $arch in \
|
|
|
|
amd64) act_arch=x86_64 ;; \
|
|
|
|
arm64) act_arch=$arch ;; \
|
|
|
|
esac \
|
|
|
|
&& curl -o /tmp/act.tgz -L \
|
|
|
|
"https://github.com/nektos/act/releases/download/v${ACT_VERSION}/act_Linux_${act_arch}.tar.gz" \
|
|
|
|
&& tar xf /tmp/act.tgz -C /usr/bin act \
|
|
|
|
&& rm /tmp/act.tgz \
|
|
|
|
&& curl -o /tmp/actiolint.zip -L \
|
|
|
|
"https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_${arch}.tar.gz" \
|
|
|
|
&& tar xf /tmp/actiolint.zip -C /usr/bin actionlint \
|
|
|
|
&& rm /tmp/actiolint.zip
|
|
|
|
|
|
|
|
|
2021-02-26 11:43:58 +00:00
|
|
|
COPY run.sh /
|
|
|
|
COPY process_style_check_result.py /
|
|
|
|
CMD ["/bin/bash", "/run.sh"]
|