Skip to content

Commit

Permalink
Switch CI to docker-compose v2 (#1516)
Browse files Browse the repository at this point in the history
  • Loading branch information
adejanovski authored Sep 10, 2024
1 parent 92ddde6 commit bab1d45
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,33 +217,33 @@ case "${TEST_TYPE}" in
sudo apt-get update
sudo apt-get install jq -y
mvn -B package -DskipTests
docker-compose -f ./src/packaging/docker-build/docker-compose.yml build
docker-compose -f ./src/packaging/docker-build/docker-compose.yml run build
docker compose -f ./src/packaging/docker-build/docker-compose.yml build
docker compose -f ./src/packaging/docker-build/docker-compose.yml run build
VERSION=$(printf 'VER\t${project.version}' | mvn help:evaluate | grep '^VER' | cut -f2)
docker build --build-arg SHADED_JAR=src/server/target/cassandra-reaper-${VERSION}.jar -f src/server/src/main/docker/Dockerfile -t cassandra-reaper:latest .
docker images

# Clear out Cassandra data before starting a new cluster
sudo rm -vfr ./src/packaging/data/

docker-compose -f ./src/packaging/docker-compose.yml up -d cassandra
sleep 30 && docker-compose -f ./src/packaging/docker-compose.yml run cqlsh-initialize-reaper_db
sleep 10 && docker-compose -f ./src/packaging/docker-compose.yml up -d reaper
docker compose -f ./src/packaging/docker-compose.yml up -d cassandra
sleep 30 && docker compose -f ./src/packaging/docker-compose.yml run cqlsh-initialize-reaper_db
sleep 10 && docker compose -f ./src/packaging/docker-compose.yml up -d reaper
docker ps -a

# requests python package is needed to use spreaper
pip install requests
mkdir -p ~/.reaper
echo "admin" > ~/.reaper/credentials
sleep 30 && src/packaging/bin/spreaper login admin
src/packaging/bin/spreaper add-cluster $(docker-compose -f ./src/packaging/docker-compose.yml run nodetool status | grep UN | tr -s ' ' | cut -d' ' -f2) 7199 > cluster.json
src/packaging/bin/spreaper add-cluster $(docker compose -f ./src/packaging/docker-compose.yml run nodetool status | grep UN | tr -s ' ' | cut -d' ' -f2) 7199 > cluster.json
cat cluster.json
cluster_name=$(cat cluster.json|grep -v "#" | jq -r '.name')
if [[ "$cluster_name" != "reaper-cluster" ]]; then
echo "Failed registering cluster in Reaper running in Docker"
exit 1
fi
sleep 5 && docker-compose -f ./src/packaging/docker-compose.yml down
sleep 5 && docker compose -f ./src/packaging/docker-compose.yml down
;;
*)
echo "Skipping, no actions for TEST_TYPE=${TEST_TYPE}."
Expand Down

0 comments on commit bab1d45

Please sign in to comment.