a9cd7750f4
CI / unit-test (push) Has been cancelled
CI / detect-changes (push) Has been cancelled
CI / build (push) Has been cancelled
Publish docs via GitHub Pages / Deploy docs (push) Has been cancelled
CI / test-harness (push) Has been cancelled
CI / generate-e2e-matrix (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / build-ui (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
UI v2 Integration CI / E2E (Integration) (push) Has been cancelled
UI v2 CI / Lint, Format & Test (push) Has been cancelled
UI v2 CI / E2E (Mocked) (push) Has been cancelled
45 lines
1.4 KiB
Bash
Executable File
45 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
COMPOSE_FILE="$SCRIPT_DIR/../docker/docker-compose-es8.yaml"
|
|
STORAGE_DIR="/tmp/conductor-file-storage-e2e"
|
|
export SERVER_ROOT_URI="${SERVER_ROOT_URI:-http://localhost:8000}"
|
|
|
|
cleanup() {
|
|
docker compose -f "$COMPOSE_FILE" down -v || true
|
|
}
|
|
|
|
# Register cleanup before compose operations so partial startup, health failures,
|
|
# interrupted runs, and test failures all remove containers and volumes.
|
|
trap cleanup EXIT
|
|
|
|
echo "Preparing shared storage dir at $STORAGE_DIR ..."
|
|
rm -rf "$STORAGE_DIR"
|
|
mkdir -p "$STORAGE_DIR"
|
|
|
|
echo "Starting Conductor (Redis + Elasticsearch 8)..."
|
|
docker compose -f "$COMPOSE_FILE" build conductor-server
|
|
docker compose -f "$COMPOSE_FILE" up -d
|
|
|
|
echo "Waiting for Conductor server at $SERVER_ROOT_URI/health ..."
|
|
for i in $(seq 1 60); do
|
|
if curl -sf "$SERVER_ROOT_URI/health" > /dev/null 2>&1; then
|
|
echo "Conductor is up after ${i} attempt(s)!"
|
|
break
|
|
fi
|
|
if [ "$i" -eq 60 ]; then
|
|
echo "ERROR: Conductor did not start in time"
|
|
docker compose -f "$COMPOSE_FILE" logs conductor-server 2>/dev/null || docker compose -f "$COMPOSE_FILE" logs
|
|
exit 1
|
|
fi
|
|
echo " Attempt $i/60 — waiting 5s..."
|
|
sleep 5
|
|
done
|
|
|
|
cd "$SCRIPT_DIR/.."
|
|
set +e
|
|
./gradlew :conductor-e2e:test -PrunE2E -DSERVER_ROOT_URI="$SERVER_ROOT_URI" "$@"
|
|
EXIT_CODE=$?
|
|
exit $EXIT_CODE
|