mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-27 21:55:16 -04:00
Docker: User build context for all images
This commit is contained in:
parent
75fc08f981
commit
f2768158e7
64 changed files with 941 additions and 1155 deletions
|
|
@ -5,16 +5,25 @@
|
|||
|
||||
FROM ubuntu:20.04
|
||||
|
||||
# Install test for python.
|
||||
WORKDIR /workspace
|
||||
|
||||
COPY ./tools/docker/scripts/install_basics.sh .
|
||||
RUN ./install_basics.sh
|
||||
|
||||
# Install dependencies.
|
||||
WORKDIR /workspace/cp2k
|
||||
COPY ./tools/docker/scripts/install_python.sh .
|
||||
RUN ./install_python.sh
|
||||
|
||||
COPY ./tools/docker/scripts/ci_entrypoint.sh ./tools/docker/scripts/test_python.sh ./
|
||||
CMD ["./ci_entrypoint.sh", "./test_python.sh"]
|
||||
# Install sources.
|
||||
ARG GIT_COMMIT_SHA
|
||||
COPY ./src ./src
|
||||
COPY ./exts ./exts
|
||||
COPY ./data ./data
|
||||
COPY ./tools ./tools
|
||||
COPY ./Makefile .
|
||||
RUN bash -c "if [ -n "${GIT_COMMIT_SHA}" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi"
|
||||
|
||||
# Run test for python.
|
||||
COPY ./tools/docker/scripts/test_python.sh .
|
||||
RUN ./test_python.sh 2>&1 | tee report.log
|
||||
|
||||
# Output the report if the image is old and was therefore pulled from the build cache.
|
||||
CMD cat $(find ./report.log -mmin +3) | sed '/^Summary:/ s/$/ (cached)/'
|
||||
|
||||
#EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue