mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 22:25:32 -04:00
precommit: Introduce new server-based framework
This commit is contained in:
parent
f64bee7208
commit
444cb768b4
8 changed files with 524 additions and 0 deletions
40
tools/precommit/Dockerfile
Normal file
40
tools/precommit/Dockerfile
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
FROM ubuntu:20.04
|
||||
|
||||
# author: Ole Schuett
|
||||
|
||||
# Install Ubuntu packages.
|
||||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
clang-format \
|
||||
git \
|
||||
less \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-wheel \
|
||||
python3-setuptools \
|
||||
rubygems \
|
||||
shellcheck \
|
||||
vim \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Markdownlint.
|
||||
RUN gem install mdl
|
||||
|
||||
# Install Black Python Formatter.
|
||||
RUN pip3 install black
|
||||
|
||||
# Clone cp2k repository (needed for CI mode).
|
||||
RUN git clone --quiet --recursive --single-branch -b master https://github.com/cp2k/cp2k.git /workspace/cp2k
|
||||
|
||||
# Install Flask app.
|
||||
RUN pip3 install flask gunicorn
|
||||
WORKDIR /opt/cp2k-precommit
|
||||
COPY precommit_server.py .
|
||||
|
||||
ARG REVISION
|
||||
ENV REVISION=${REVISION}
|
||||
|
||||
COPY entrypoint.sh .
|
||||
CMD ["./entrypoint.sh"]
|
||||
|
||||
#EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue