Skip to content

Commit

Permalink
ci: retry docker compose up once if it fails (#3581)
Browse files Browse the repository at this point in the history
I've been getting network issues in `docker compose up` causing
integration test failures on CI.
Hopefully this makes it more resilient.
  • Loading branch information
matt2e authored Nov 29, 2024
1 parent 25badd1 commit 5dbc850
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,24 @@ list-docker-images:
# Run docker compose up with all docker compose files
compose-up:
#!/bin/bash
set -eo pipefail
set -o pipefail
docker_compose_files="
-f docker-compose.yml
-f internal/dev/docker-compose.grafana.yml
-f internal/dev/docker-compose.mysql.yml
-f internal/dev/docker-compose.postgres.yml
-f internal/dev/docker-compose.redpanda.yml
-f internal/dev/docker-compose.registry.yml"

docker compose -p "ftl" $docker_compose_files up -d --wait
status=$?
if [ $status -ne 0 ] && [ -n "${CI-}" ]; then
# CI fails regularly due to network issues. Retry once.
echo "docker compose up failed, retrying in 3s..."
docker compose -p "ftl" $docker_compose_files up -d --wait
docker compose -p "ftl" $docker_compose_files up -d --wait
fi


# Run a Just command in the Helm charts directory
chart *args:
Expand Down

0 comments on commit 5dbc850

Please sign in to comment.