pipeline build v42. correct reversion 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
b8e967d949
commit
5a626234ed
@ -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,11 +35,11 @@ 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:
|
||||
when:
|
||||
event:
|
||||
- push
|
Loading…
Reference in New Issue
Block a user