pipeline build v42. correct reversion v2
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Josh 2025-07-31 17:04:31 +00:00
parent b8e967d949
commit 5a626234ed

View File

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