Simplify GitLab CI Dockerfiles.
[gromacs.git] / admin / dockerfiles / buildall.sh
blob0e68cf6abe547727984edc757383036bd02982eb
1 #!/bin/bash
3 export TARGET=$0
4 export TARGET_VERSION=$1
5 export MATRIX="$TARGET-$TARGET_VERSION"
6 export SLUG="ci-$MATRIX"
8 docker login
10 docker pull gromacs/base || true
11 docker build -t gromacs/base --cache-from gromacs/base base
12 docker push gromacs/base
14 tool=clang
15 for tool_version in 6 7 8; do
16 MATRIX="$tool-$tool_version"
17 SLUG="ci-$MATRIX"
18 docker build \
19 -t gromacs/continuous-integration:$SLUG \
20 --build-arg TOOL_VERSION=$tool_version \
21 ci-$tool
22 done
24 tool=gcc
25 for tool_version in 5 6 7 8; do
26 MATRIX="$tool-$tool_version"
27 SLUG="ci-$MATRIX"
28 docker build \
29 -t gromacs/continuous-integration:$SLUG \
30 --build-arg TOOL_VERSION=$tool_version \
31 ci-$tool
32 done
34 docker build -t gromacs/continuous-integration:ci-docs-clang \
35 ci-docs-clang
37 docker build -t gromacs/continuous-integration:ci-docs-gcc \
38 ci-docs-gcc
40 docker push gromacs/continuous-integration