mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 08:36:34 +00:00
Update autopilot workflow and documentation for project cycle completion
- Modified the existing-code workflow to automatically loop back to New Task after project completion without user confirmation. - Updated the autopilot state to reflect the current step as `done` and status as `completed`. - Clarified the deployment status report by specifying non-deployed services and their purposes. These changes enhance the automation of task management and improve documentation clarity.
This commit is contained in:
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $(basename "$0") [--help]
|
||||
|
||||
Gracefully stop Azaion AI Training services.
|
||||
Saves current image tags for rollback.
|
||||
EOF
|
||||
exit 0
|
||||
}
|
||||
|
||||
[[ "${1:-}" == "--help" ]] && usage
|
||||
|
||||
if [[ -f "$PROJECT_ROOT/.env" ]]; then
|
||||
set -a
|
||||
source "$PROJECT_ROOT/.env"
|
||||
set +a
|
||||
fi
|
||||
|
||||
PREV_TAGS="$SCRIPT_DIR/.previous-tags"
|
||||
|
||||
echo "Saving current image tags for rollback..."
|
||||
{
|
||||
for svc in annotation-queue; do
|
||||
cid=$(docker compose -f "$PROJECT_ROOT/docker-compose.yml" ps -q "$svc" 2>/dev/null || true)
|
||||
if [[ -n "$cid" ]]; then
|
||||
img=$(docker inspect --format='{{.Config.Image}}' "$cid" 2>/dev/null || echo "unknown")
|
||||
echo "PREV_IMAGE_${svc//-/_}=$img"
|
||||
fi
|
||||
done
|
||||
} > "$PREV_TAGS"
|
||||
|
||||
echo "Stopping services (30s grace period)..."
|
||||
docker compose -f "$PROJECT_ROOT/docker-compose.yml" stop -t 30
|
||||
|
||||
echo "Removing containers..."
|
||||
docker compose -f "$PROJECT_ROOT/docker-compose.yml" down --remove-orphans
|
||||
|
||||
echo "Services stopped. Previous tags saved to $PREV_TAGS"
|
||||
Reference in New Issue
Block a user