fix: use GEMINI_API_KEY as secret manager health check (exists in project)

This commit is contained in:
chrischristiansen-glitch 2026-05-28 01:50:40 +02:00
parent f4af4731ed
commit e4f42213a2

View File

@ -2,9 +2,6 @@
# =============================================================================
# OPAX.SH — Authoritative OSVauco OPAX Environment Bootstrapper
#
# Idempotent script to set up the OPAX operator environment.
# Can be sourced multiple times without side-effects.
#
# Usage: source ~/OSVauco/scripts/opax.sh
# Alias: opax
# =============================================================================
@ -15,7 +12,7 @@ export GOOGLE_CLOUD_PROJECT="propane-will-491900-m5"
export GOOGLE_CLOUD_LOCATION="us-central1"
export GEMINI_MODEL="gemini-2.5-pro"
# --- UI Colors and Icons ---
# --- UI Colors ---
GREEN="$(tput setaf 2 2>/dev/null || printf '\033[0;32m')"
RED="$(tput setaf 1 2>/dev/null || printf '\033[0;31m')"
YELLOW="$(tput setaf 3 2>/dev/null || printf '\033[1;33m')"
@ -85,15 +82,15 @@ if [[ -z "${OPAX_LOADED-}" ]]; then
"Cannot reach git remote origin" \
true
run_check "Secret Manager readable" \
"gcloud secrets versions access latest --secret=github-token --project=$GOOGLE_CLOUD_PROJECT" \
"Check IAM permissions for Secret Manager"
run_check "Secret Manager tilgjengelig" \
"gcloud secrets versions access latest --secret=GEMINI_API_KEY --project=$GOOGLE_CLOUD_PROJECT" \
"Sjekk IAM-tillatelser for Secret Manager"
run_check "Git working tree clean" \
"git -C '$OSVAUCO_DIR' diff --quiet && git -C '$OSVAUCO_DIR' diff --cached --quiet" \
"Uncommitted changes present"
# Cloud Run health — bruk osvauco-agent (ikke opax-mcp-core)
# Cloud Run health
SERVICE_URL=$(gcloud run services describe osvauco-agent \
--region "$GOOGLE_CLOUD_LOCATION" \
--project "$GOOGLE_CLOUD_PROJECT" \