diff options
author | Florian Dold <florian@dold.me> | 2023-01-20 13:50:03 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-01-20 13:50:22 +0100 |
commit | 8f821faf4c0e006dd17088c75d3f5002ba28c093 (patch) | |
tree | 657f2ff94f4799efaaa692eed0661f12d8d09fa0 | |
parent | 25bd43949358cbd301cbf6f50c5fbf5b3abfee95 (diff) | |
download | deployment-8f821faf4c0e006dd17088c75d3f5002ba28c093.tar.gz deployment-8f821faf4c0e006dd17088c75d3f5002ba28c093.tar.bz2 deployment-8f821faf4c0e006dd17088c75d3f5002ba28c093.zip |
-missing files
-rw-r--r-- | docker/compile-and-check/base/util.sh | 34 | ||||
-rwxr-xr-x | docker/compile-and-check/build.sh | 8 | ||||
-rw-r--r-- | docker/compile-and-check/config/tags.sh | 7 | ||||
-rwxr-xr-x | docker/compile-and-check/interactive.sh | 8 | ||||
-rwxr-xr-x | docker/compile-and-check/run.sh | 8 |
5 files changed, 65 insertions, 0 deletions
diff --git a/docker/compile-and-check/base/util.sh b/docker/compile-and-check/base/util.sh new file mode 100644 index 0000000..9ff8984 --- /dev/null +++ b/docker/compile-and-check/base/util.sh @@ -0,0 +1,34 @@ +export PATH=$HOME/.npm-global/bin:$PATH +export PATH=$HOME/local/bin:$PATH +export PATH=/lib/postgresql/15/bin/:$PATH + +export DBDIR=$HOME/talerdb +export LOGDIR=$HOME/logs +export TMPDIR=$HOME/tmp +export SOCKDIR=$HOME/sockets +export PGHOST=$SOCKDIR + +function db_start() { + mkdir -p $SOCKDIR + mkdir -p $LOGDIR + mkdir -p $TMPDIR + initdb --no-sync --auth=trust -D $DBDIR # > /logs/postgres-dbinit.log 2> /logs/postgres-dbinit.er + echo "Launching Postgres" + cat - > $DBDIR/postgresql.conf <<EOF +unix_socket_directories='$SOCKDIR' +fsync=off +max_wal_senders=0 +synchronous_commit=off +wal_level=minimal +listen_addresses='' +EOF + cat $DBDIR/pg_hba.conf | grep -v host > $DBDIR/pg_hba.conf.new + mv $DBDIR/pg_hba.conf.new $DBDIR/pg_hba.conf + pg_ctl -D $DBDIR -l /dev/null start > $LOGDIR/postgres-start.log 2> $LOGDIR/postgres-start.err + echo " DONE" +} + +db_destroy() { + pg_ctl -D $DBDIR -l /dev/null stop + rm -rf $DBDIR +} diff --git a/docker/compile-and-check/build.sh b/docker/compile-and-check/build.sh new file mode 100755 index 0000000..c5164ed --- /dev/null +++ b/docker/compile-and-check/build.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Build the image and tag it + +mydir="$(dirname -- "$0")" +cd $mydir + +exec docker build -f base/Dockerfile -t sandcastle-checker . diff --git a/docker/compile-and-check/config/tags.sh b/docker/compile-and-check/config/tags.sh new file mode 100644 index 0000000..49c13a4 --- /dev/null +++ b/docker/compile-and-check/config/tags.sh @@ -0,0 +1,7 @@ +TAG_LIBMHD=v0.9.75 +TAG_GNUNET=v0.19.2 +TAG_EXCHANGE=master +TAG_MERCHANT=master +TAG_EXCHANGE=master +TAG_SYNC=master +TAG_WALLET=master diff --git a/docker/compile-and-check/interactive.sh b/docker/compile-and-check/interactive.sh new file mode 100755 index 0000000..94fb404 --- /dev/null +++ b/docker/compile-and-check/interactive.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Run the image in interactive mode + +mydir="$(dirname -- "$0")" +cd $mydir + +exec docker run -it --entrypoint /bin/bash sandcastle-checker diff --git a/docker/compile-and-check/run.sh b/docker/compile-and-check/run.sh new file mode 100755 index 0000000..fc113da --- /dev/null +++ b/docker/compile-and-check/run.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Run compilation and tests in the image + +mydir="$(dirname -- "$0")" +cd $mydir + +exec docker run -it sandcastle-checker |