From 230a6fb825e43859a66ebcaa59531079843d17a7 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 31 Jul 2025 15:21:17 +0000 Subject: [PATCH] pipeline build v25 - TAG slicing v2 --- .woodpecker.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 8a1c9ba..7c61ce5 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,7 +9,7 @@ steps: mkdir -p ~/.ssh - # ── Inject known-hosts and SSH key from Secret Manager ───── + # ── Inject known-hosts and SSH key ────────────────────────────── gcloud secrets versions access latest \ --secret=STAGING_KNOWN_HOSTS --project=aptivaai-dev \ | base64 -d > ~/.ssh/known_hosts @@ -22,16 +22,17 @@ steps: echo "🔑 SSH prerequisites installed" - # ── Tag slicing from CI_COMMIT_SHA only ──────────────────── - TAG=$(echo "${CI_COMMIT_SHA}" | head -c 8) + # ── Grab full commit SHA and slice tag ────────────────────────── + echo "📦 CI_COMMIT_SHA: ${CI_COMMIT_SHA:-unset}" + TAG="${CI_COMMIT_SHA:-}" if [ -z "$TAG" ]; then - echo "❌ CI_COMMIT_SHA is missing or blank" + echo "❌ CI_COMMIT_SHA is blank. Aborting." exit 1 fi - + TAG=$(echo "$TAG" | head -c 8) echo "🚀 Deploying tag ${TAG} to staging" - # ── SSH into staging and refresh the Docker stack ────────── + # ── SSH into staging and refresh the stack ────────────────────── ssh -o StrictHostKeyChecking=yes \ -i ~/.ssh/id_ed25519 \ jcoakley@10.128.0.12 \