pipeline build v19 - Copilot bash fix

This commit is contained in:
Josh 2025-07-31 15:01:22 +00:00
parent 177edea37d
commit 0c3238a611

View File

@ -1,20 +1,17 @@
steps:
ssh-test: # keep the name, keep the image
ssh-test:
image: google/cloud-sdk:latest
commands:
- |
#!/usr/bin/env bash
entrypoint: ["bash", "-c"]
commands: |
set -euo pipefail
mkdir -p ~/.ssh
# ── Install knownhosts from Secret Manager ─────────────────
gcloud secrets versions access latest \
--secret=STAGING_KNOWN_HOSTS --project=aptivaai-dev \
| base64 -d > ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
# ── Install private key ────────────────────────────────────
gcloud secrets versions access latest \
--secret=STAGING_SSH_KEY --project=aptivaai-dev \
| base64 -d > ~/.ssh/id_ed25519
@ -22,11 +19,9 @@ steps:
echo "🔑 SSH prerequisites installed"
# ── Tag = first 8 chars of the commit SHA that triggered CI ─
TAG=$(echo "${CI_COMMIT_SHA:-$DRONE_COMMIT_SHA}" | head -c 8)
echo "🚀 Deploying tag ${TAG} to staging"
# ── SSH into the staging VM and refresh the stack ──────────
ssh -o StrictHostKeyChecking=yes \
-i ~/.ssh/id_ed25519 \
jcoakley@10.128.0.12 \