#!/usr/bin/env bash
#MISE description="tilt ci for the infra subset only (no app images) — what integration tests need"
#MISE dir="{{config_root}}"
# The closure of every non-app resource: chart repos, operators, the Ceph dev
# cluster + RGW user, CNPG database, mock-oidc and the victoria pair. Skipping
# the four heavy app images (yucca-api/admin/web/michael) saves ~10 min in CI;
# integration tests boot those apps on the host themselves.
set -euo pipefail

if ! kubectl config current-context | grep -q '^k3d-yucca$'; then
  echo "Current kube context is not k3d-yucca. Run: mise k3d:up" >&2
  exit 1
fi

exec tilt ci --timeout 1800s \
  cloudnative-pg-repo rook-release-repo victoriametrics-repo helm-deps \
  cloudnative-pg rook-ceph-operator rook-ceph-cluster \
  yucca-object-user yucca-database yucca-mock-oidc \
  yucca-victoria-metrics yucca-victoria-logs
