diff --git a/docker/test/.gitignore b/docker/test/.gitignore index e15be05..95ccc00 100644 --- a/docker/test/.gitignore +++ b/docker/test/.gitignore @@ -1,2 +1,3 @@ test-repo orderly-root-volume +logs-volume \ No newline at end of file diff --git a/docker/test/common b/docker/test/common index 957bad7..8bda3d0 100755 --- a/docker/test/common +++ b/docker/test/common @@ -16,3 +16,7 @@ export ORDERLY_VOLUME=$CONTAINER_NAMESPACE-orderly-root export ORDERLY_RUNNER_IMAGE=ghcr.io/mrc-ide/orderly.runner:main export CONTAINER_ORDERLY_ROOT_PATH=/orderly-root + +export LOGS_DIR=/logs + +export ORDERLY_LOGS_VOLUME=$CONTAINER_NAMESPACE-logs diff --git a/docker/test/copy-orderly-root b/docker/test/copy-orderly-root index 6979350..0b744ee 100755 --- a/docker/test/copy-orderly-root +++ b/docker/test/copy-orderly-root @@ -8,3 +8,5 @@ rm -rf $HERE/orderly-root-volume mkdir -p $HERE/orderly-root-volume docker cp $DEBUG:$CONTAINER_ORDERLY_ROOT_PATH/. $HERE/orderly-root-volume + +docker cp $DEBUG:$LOGS_DIR/. $HERE/logs-volume diff --git a/docker/test/run-test b/docker/test/run-test index 3841278..cbb916c 100755 --- a/docker/test/run-test +++ b/docker/test/run-test @@ -16,10 +16,12 @@ docker run --rm -d \ redis docker volume create $ORDERLY_VOLUME +docker volume create $ORDERLY_LOGS_VOLUME docker run --rm -d --pull=missing \ --name=$DEBUG \ -v $ORDERLY_VOLUME:$CONTAINER_ORDERLY_ROOT_PATH \ + -v $ORDERLY_LOGS_VOLUME:$LOGS_DIR \ ubuntu \ sleep infinity @@ -33,6 +35,7 @@ docker run --rm -d --pull=always \ --env=REDIS_CONTAINER_NAME=$REDIS \ -p 127.0.0.1:8001:8001 \ -v $ORDERLY_VOLUME:$CONTAINER_ORDERLY_ROOT_PATH \ + -v $ORDERLY_LOGS_VOLUME:$LOGS_DIR \ $ORDERLY_RUNNER_IMAGE \ $CONTAINER_ORDERLY_ROOT_PATH @@ -43,5 +46,6 @@ docker run --rm -d --pull=always \ --env=ORDERLY_RUNNER_QUEUE_ID=$ORDERLY_RUNNER_QUEUE_ID \ --env=REDIS_CONTAINER_NAME=$REDIS \ -v $ORDERLY_VOLUME:$CONTAINER_ORDERLY_ROOT_PATH \ + -v $ORDERLY_LOGS_VOLUME:$LOGS_DIR \ $ORDERLY_RUNNER_IMAGE \ $CONTAINER_ORDERLY_ROOT_PATH