diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 06a4737d..cbda73b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,6 @@ build-and-benchmark: stage: build-and-benchmark tags: [yuria2] script: - - podman build . -f Dockerfile -t rebenchdb - - podman build . -f Dockerfile.rebench -t bench-rdb - - podman run --hostname yuria2-podman bench-rdb:latest -c --experiment="CI ID $CI_PIPELINE_ID" --branch="$CI_COMMIT_REF_NAME" rebench.conf + - podman-compose -f ./docker-compose.yml -f ./docker-compose.rebench.yml up + after_script: + - podman-compose down diff --git a/Dockerfile.rebench b/Dockerfile.rebench index fc205f32..1d9db007 100644 --- a/Dockerfile.rebench +++ b/Dockerfile.rebench @@ -1,14 +1,10 @@ # Used for benchmarking -FROM rebenchdb:latest +FROM rebenchdb-app RUN apt-get install -y git python3-pip RUN pip install --break-system-packages git+https://github.com/smarr/ReBench.git -RUN echo 'echo Starting PostgreSQL Server\n\ -docker-entrypoint.sh postgres &\n\ -rebench "$@"' > ./start-server-and-rebench.sh - RUN npm run pretest -ENTRYPOINT ["bash", "./start-server-and-rebench.sh"] +ENTRYPOINT ["rebench"] CMD ["--help"] diff --git a/docker-compose.rebench.yml b/docker-compose.rebench.yml new file mode 100644 index 00000000..b33729bd --- /dev/null +++ b/docker-compose.rebench.yml @@ -0,0 +1,14 @@ +version: '3' + +services: + rebenchdb-app: + build: + context: . + dockerfile: Dockerfile.rebench + image: rebenchdb-rebench + environment: + - CI_PIPELINE_ID + - CI_COMMIT_REF_NAME + command: | + curl --retry 5 --retry-delay 5 --retry-all-errors http://localhost:33333/status + rebench -c --experiment="CI ID $$CI_PIPELINE_ID" --branch="$$CI_COMMIT_REF_NAME" rebench.conf