pipeline build v46. Reverted to working

This commit is contained in:
Josh 2025-07-31 17:16:42 +00:00
parent e259c529af
commit c9275f3b03

View File

@ -1,31 +1,26 @@
---
kind: pipeline
type: docker
name: ssh-test
steps:
- name: ssh-test
image: google/cloud-sdk:latest
entrypoint:
- bash
- -c
- >
set -euo pipefail;
- |
set -euo pipefail
mkdir -p ~/.ssh;
mkdir -p ~/.ssh
# ── Inject known-hosts and SSH key ───────────────────────────────
gcloud secrets versions access latest \
--secret=STAGING_KNOWN_HOSTS --project=aptivaai-dev \
| base64 -d > ~/.ssh/known_hosts;
chmod 644 ~/.ssh/known_hosts;
| base64 -d > ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
gcloud secrets versions access latest \
--secret=STAGING_SSH_KEY --project=aptivaai-dev \
| base64 -d > ~/.ssh/id_ed25519;
chmod 600 ~/.ssh/id_ed25519;
| base64 -d > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
echo "🔑 SSH prerequisites installed";
echo "🔑 SSH prerequisites installed"
# ── SSH into staging and deploy ──────────────────────────────────
ssh -o StrictHostKeyChecking=yes \
@ -40,10 +35,10 @@ steps:
sudo --preserve-env=IMG_TAG docker compose pull; \
sudo --preserve-env=IMG_TAG docker compose up -d --force-recreate --remove-orphans; \
echo "✅ Staging stack refreshed with tag $IMG_TAG"'
secrets:
- STAGING_SSH_KEY
- STAGING_KNOWN_HOSTS
- IMG_TAG
when:
event: