All checks were successful
Build, test and publish / verify (push) Successful in 1m41s
30 lines
1.2 KiB
Bash
30 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
source "$(dirname -- "$0")/common.sh"
|
|
status=0
|
|
# Copy only test diagnostics, never environment dumps, Docker inspect or credentials.
|
|
for report in agiledancers-be/target/surefire-reports agiledancers-be/target/failsafe-reports \
|
|
agiledancers-fe/unit-results agiledancers-fe/test-results agiledancers-fe/playwright-report; do
|
|
if [[ -d "$report" ]]; then
|
|
destination="$ARTIFACTS/$report"
|
|
mkdir -p "$destination"
|
|
cp -R "$report/." "$destination/" || status=1
|
|
fi
|
|
done
|
|
if docker info >/dev/null 2>&1; then
|
|
for role in backend frontend browser; do
|
|
container="$RUN_NAME-$role"
|
|
if docker container inspect "$container" >/dev/null 2>&1; then
|
|
docker logs "$container" > "$ARTIFACTS/$role.log" 2>&1 || status=1
|
|
docker rm -f "$container" >/dev/null || status=1
|
|
fi
|
|
done
|
|
if docker network inspect "$RUN_NAME" >/dev/null 2>&1; then
|
|
docker network rm "$RUN_NAME" >/dev/null || status=1
|
|
fi
|
|
rm -f "$ARTIFACTS/containers-started"
|
|
elif [[ -f "$ARTIFACTS/containers-started" ]]; then
|
|
echo "Docker is unavailable; cleanup could not be confirmed" >&2
|
|
status=1
|
|
fi
|
|
exit "$status"
|