pipeline build v25 - TAG slicing v2
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
56190e7f9e
commit
0d6b3c2e5b
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user