sand-boxer/scripts/smoke-build-profile.sh
tegwick 55398d7aa1
Some checks are pending
CI Smoke / host-smoke (push) Waiting to run
CI Smoke / container-smoke (push) Waiting to run
Name snuggles-inventor as the code-generation owner.
Assistant: grok
Assistant-Session: 01a0d25d-d358-7e13-b84a-d007fbb7e34f
2026-09-24 09:56:40 +02:00

23 lines
No EOL
787 B
Bash
Executable file

#!/usr/bin/env bash
# Smoke profile.build — requires VM tunnel and optional build-registry-token secret.
set -euo pipefail
if [[ -z "${SANDBOXER_SECRET_BUILD_REGISTRY_TOKEN:-}" ]]; then
echo "SANDBOXER_SECRET_BUILD_REGISTRY_TOKEN not set — skipping live smoke" >&2
exit 0
fi
VM="${SMOKE_VM:-haskell-build}"
TUNNEL_PORT="${SANDBOXER_VM_TUNNEL_PORT:-12222}"
echo "Smoke: profile.build vm=$VM tunnel=$TUNNEL_PORT"
STATUS=$(sandboxer create \
--profile profile.build \
--input "vm=$VM" \
--input "tunnel_port=$TUNNEL_PORT" \
--actor agt \
--project snuggles-inventor)
ID=$(echo "$STATUS" | python3 -c "import sys,json; print(json.load(sys.stdin)['sandbox_id'])")
echo "Created: $ID"
sandboxer reachability show "$ID"
sandboxer destroy "$ID"
echo "OK: build profile smoke"