Files
school_compare/integrator/docker/kestra-init.sh

18 lines
413 B
Bash
Raw Normal View History

#!/bin/sh
set -e
KESTRA_URL="${KESTRA_URL:-http://kestra:8080}"
echo "Importing flows into Kestra at ${KESTRA_URL}..."
for f in /flows/*.yml; do
echo " -> $(basename "$f")"
curl -sf -X POST "${KESTRA_URL}/api/v1/flows/import" \
-H "Content-Type: multipart/form-data" \
-F "fileUpload=@${f}" \
|| { echo "Failed to import $(basename "$f")"; exit 1; }
echo ""
done
echo "All flows imported."