pipeline build v13 - no remote, only direct transfer

This commit is contained in:
Josh 2025-07-31 14:49:24 +00:00
parent dfedd49651
commit 9849137be1

View File

@ -11,19 +11,20 @@ steps:
gcloud secrets versions access latest --secret=STAGING_KNOWN_HOSTS --project=aptivaai-dev | base64 -d > ~/.ssh/known_hosts gcloud secrets versions access latest --secret=STAGING_KNOWN_HOSTS --project=aptivaai-dev | base64 -d > ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts chmod 644 ~/.ssh/known_hosts
# Inject SSH key for staging push # Inject SSH key
gcloud secrets versions access latest --secret=STAGING_SSH_KEY --project=aptivaai-dev | base64 -d > ~/.ssh/id_ed25519 gcloud secrets versions access latest --secret=STAGING_SSH_KEY --project=aptivaai-dev | base64 -d > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
# Verify injected key (optional) # Confirm working tree location
echo "Key size: $(wc -c < ~/.ssh/id_ed25519) bytes" SRC_DIR="$PWD/repo" # Assuming you cloned to ./repo
head -n 2 ~/.ssh/id_ed25519 DEST_DIR="/home/jcoakley/dev1" # Confirm if this is correct on staging
# Pull latest master from origin # Clone dev1 repo
git config --global user.name "Woodpecker CI" git config --global user.name "Woodpecker CI"
git config --global user.email "ci@aptivaai.com" git config --global user.email "ci@aptivaai.com"
git clone https://jcoakley:f4bf7ac91bdbd16bf47d241860198ba0bbe4b5c6@gitea.dev1.aptivaai.com/jcoakley/dev1.git repo git clone https://jcoakley:f4bf7ac91bdbd16bf47d241860198ba0bbe4b5c6@gitea.dev1.aptivaai.com/jcoakley/dev1.git repo
cd repo
# Push to staging remote over SSH # Rsync to staging VM
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes" git push staging master --force rsync -az --delete -e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes" \
--exclude '.git' \
"$SRC_DIR/" jcoakley@10.128.0.12:"$DEST_DIR"