Skip to content

Commit

Permalink
Adapt GitLab CI setup
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
  • Loading branch information
smarr committed Jan 20, 2024
1 parent ab447ae commit d46f99f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 2 additions & 6 deletions Dockerfile.rebench
Original file line number Diff line number Diff line change
@@ -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"]
14 changes: 14 additions & 0 deletions docker-compose.rebench.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d46f99f

Please sign in to comment.