summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-01-19 11:57:15 +0100
committerFlorian Dold <florian@dold.me>2023-01-19 11:57:45 +0100
commit0962ed1b917893da68f6711df6f7e2e44c5b3195 (patch)
tree4b785e9c12e9b26b13c4f916f867ea20d7f2a16b /docker
parent3de519c33419dea6105d6f43d0a0259232d7edfe (diff)
downloaddeployment-0962ed1b917893da68f6711df6f7e2e44c5b3195.tar.gz
deployment-0962ed1b917893da68f6711df6f7e2e44c5b3195.tar.bz2
deployment-0962ed1b917893da68f6711df6f7e2e44c5b3195.zip
also run taler-harness
Diffstat (limited to 'docker')
-rw-r--r--docker/compile-and-check/base/Dockerfile46
-rwxr-xr-xdocker/compile-and-check/base/compile_and_check.sh95
2 files changed, 86 insertions, 55 deletions
diff --git a/docker/compile-and-check/base/Dockerfile b/docker/compile-and-check/base/Dockerfile
index 0d6fc34..2f946f1 100644
--- a/docker/compile-and-check/base/Dockerfile
+++ b/docker/compile-and-check/base/Dockerfile
@@ -1,26 +1,40 @@
-FROM debian:experimental
+FROM debian:bookworm
+
+
+# This image provides base dependencies needed to compile and run
+# GNU Taler components
+
RUN apt-get update
+# Explanations for weirder dependencies:
+# - texlive-* is required by the exchange test cases
RUN apt-get install -y autoconf autopoint libtool texinfo \
libgcrypt-dev libidn11-dev zlib1g-dev libunistring-dev \
libjansson-dev python3-pip git recutils libsqlite3-dev \
libpq-dev postgresql libcurl4-openssl-dev libsodium-dev git \
libqrencode-dev zip jq npm openjdk-17-jre nginx procps \
curl python3-jinja2 wget curl python3-sphinx socat apache2-utils \
- python3-sphinx-rtd-theme sqlite3 vim emacs
+ python3-sphinx-rtd-theme sqlite3 vim emacs faketime \
+ texlive-latex-base texlive-latex-extra
+
+RUN useradd -m talercheck
+
+USER talercheck
+WORKDIR /home/talercheck
+
+# pnpm likes to have the tmp directory
+RUN mkdir -p tmp
+
+# Make pip3 happy by running as a non-root user
+# and setting PATH correctly
+ENV PATH="/home/talercheck/.local/bin:$PATH"
+
RUN pip3 install requests click poetry uwsgi htmlark
-ARG tags_file
-# The following command provides a conditional copy from
-# the host filesystem. It mounts the current directory -
-# where the tags file MIGHT be - to /context in the container.
-# It appears NOT possible to mount arbitrary paths from the
-# host with "RUN --mount". Hence, when a tags file is given,
-# the CWD has to be the one containing the tags file. build_base.sh
-# sets (1) the CWD this way and (2) $tags_file to be the tags file
-# basename, before starting the compilation.
-RUN --mount=target=/context if test -n "$tags_file"; then cp \
-/context/${tags_file} /tags.sh; else touch /tags.sh; fi
-RUN chmod +x /tags.sh
-COPY ./compile_and_check.sh /
-ENTRYPOINT /compile_and_check.sh
+RUN npm config set prefix $HOME/.npm-global
+RUN npm install -g pnpm
+
+COPY ./base/util.sh ./base/compile_and_check.sh /home/talercheck/
+COPY ./config/tags.sh /home/talercheck/tags.sh
+
+ENTRYPOINT /home/talercheck/compile_and_check.sh
diff --git a/docker/compile-and-check/base/compile_and_check.sh b/docker/compile-and-check/base/compile_and_check.sh
index f12f1e9..59e16cb 100755
--- a/docker/compile-and-check/base/compile_and_check.sh
+++ b/docker/compile-and-check/base/compile_and_check.sh
@@ -1,6 +1,7 @@
#!/bin/bash
set -eu
+set -x
start_debug_shell () {
if test "${SANDCASTLE_DEBUG_SHELL:-no}" = yes; then
@@ -10,6 +11,9 @@ start_debug_shell () {
fi
}
trap start_debug_shell ERR
+
+source ~/util.sh
+
echo -n Exporting the tags environment..
set -a
. tags.sh
@@ -18,60 +22,73 @@ echo DONE
echo Exported tags:
{ env | grep TAG_; } || echo NONE
-git clone git://git.gnunet.org/libmicrohttpd --branch ${TAG_LIBMHD:-master}
-git clone git://git.gnunet.org/gnunet --branch ${TAG_GNUNET:-master}
-git clone git://git.taler.net/exchange --branch ${TAG_EXCHANGE:-master}
-git clone git://git.taler.net/merchant --branch ${TAG_MERCHANT:-master}
-git clone git://git.taler.net/libeufin --branch ${TAG_LIBEUFIN:-master}
-git clone git://git.taler.net/taler-merchant-demos --branch ${TAG_MERCHANT_DEMOS:-master}
-git clone git://git.taler.net/wallet-core --branch ${TAG_WALLET:-master}
-git clone git://git.taler.net/sync --branch ${TAG_SYNC:-master}
+export LD_LIBRARY_PATH=$HOME/local
+
+num_processors=$(getconf _NPROCESSORS_ONLN)
+JFLAG="-j$num_processors"
+PREFIX=$HOME/local
-cd /libmicrohttpd
+git clone --depth=1 git://git.gnunet.org/libmicrohttpd --branch ${TAG_LIBMHD:-master}
+git clone --depth=1 git://git.gnunet.org/gnunet --branch ${TAG_GNUNET:-master}
+git clone --depth=1 git://git.taler.net/exchange --branch ${TAG_EXCHANGE:-master}
+git clone --depth=1 git://git.taler.net/merchant --branch ${TAG_MERCHANT:-master}
+git clone --depth=1 git://git.taler.net/libeufin --branch ${TAG_LIBEUFIN:-master}
+git clone --depth=1 git://git.taler.net/taler-merchant-demos --branch ${TAG_MERCHANT_DEMOS:-master}
+git clone --depth=1 git://git.taler.net/wallet-core --branch ${TAG_WALLET:-master}
+git clone --depth=1 git://git.taler.net/sync --branch ${TAG_SYNC:-master}
+
+cd ~/libmicrohttpd
./bootstrap
-./configure --disable-doc
-make install
+./configure --disable-doc --prefix=$PREFIX
+make $JFLAG install
-cd /gnunet
+cd ~/gnunet
./bootstrap
-./configure --enable-logging=verbose --disable-documentation
-make install
+./configure --enable-logging=verbose --disable-documentation --prefix=$PREFIX --with-microhttpd=$PREFIX
+make $JFLAG install
-cd /exchange
-if test "${TAG_EXCHANGE:-}" = "v0.9.0"; then
- # Init Gana and checkout the v0.9.0-compatible commit.
- git submodule init contrib/gana
- git submodule update --remote contrib/gana
- # Note: without init first, the following checkout hits "reference is not a tree".
- git -C contrib/gana checkout 6b9824cb4d4561f1167c7f518998a226a82222d6;
- # Remove master branch tracking the remote
- git -C contrib/gana branch -d master
- git -C contrib/gana remote set-url origin .
- git -C contrib/gana branch master
-fi
+cd ~/exchange
./bootstrap
-./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc
-make install
-make check
+./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc --prefix=$PREFIX --with-gnunet=$PREFIX
+make $JFLAG install
-cd /merchant
+cd ~/merchant
./bootstrap
-./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc
-make install
-make check
+./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc --prefix=$PREFIX --with-gnunet=$PREFIX --with-exchange=$PREFIX
+make $JFLAG install
-cd /libeufin
+cd ~/libeufin
./bootstrap
-./configure
+./configure --prefix=$PREFIX
make install
-cd /taler-merchant-demos
+cd ~/taler-merchant-demos
./bootstrap
-./configure
+./configure --destination=local
make install
-cd /sync
+cd ~/sync
+./bootstrap
+./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc --prefix=$PREFIX --with-gnunet=$PREFIX --with-exchange=$PREFIX
+make $JFLAG install
+
+cd ~/wallet-core
./bootstrap
-./configure CFLAGS="-ggdb -O0" --enable-logging=verbose --disable-doc
+cd ~/wallet-core/packages/taler-wallet-cli
+./configure --prefix=$HOME/local
make install
+cd ~/wallet-core/packages/taler-harness
+./configure --prefix=$HOME/local
+make install
+
+db_start
+createdb talercheck
+
+cd ~/exchange
+make check
+
+cd ~/merchant
make check
+
+cd ~
+taler-harness run-integrationtests