fix: use literal block scalar with backslash continuation for quoted ssh/scp commands (known woodpecker parsing quirk)
ci/woodpecker/push/deploy Pipeline was successful
ci/woodpecker/deployment/deploy Pipeline failed

This commit is contained in:
2026-09-18 21:58:25 +02:00
parent ac735bb27a
commit cc0241fc30
+18 -18
View File
@@ -51,27 +51,27 @@ steps:
# Ensure the remote working directory exists, then transfer
# compose.yaml, release.env, the decrypted secrets and the generic
# bin/deploy-compose script to the target host.
- >-
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
"$SSH_USER@$SSH_HOST"
"mkdir -p /tmp/poc-deploy"
- >-
scp -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
compose.yaml release.env secrets.decrypted.env
- |
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
"$SSH_USER@$SSH_HOST" "mkdir -p /tmp/poc-deploy"
- |
scp -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
compose.yaml release.env secrets.decrypted.env \
"$SSH_USER@$SSH_HOST:/tmp/poc-deploy/"
- >-
scp -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
"$CI_WORKSPACE/bin/deploy-compose"
- |
scp -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
"$CI_WORKSPACE/bin/deploy-compose" \
"$SSH_USER@$SSH_HOST:/tmp/poc-deploy/"
# Run the deployment on the target host, then remove the plaintext secrets.
- >-
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
"$SSH_USER@$SSH_HOST"
"chmod +x /tmp/poc-deploy/deploy-compose && /tmp/poc-deploy/deploy-compose"
- >-
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
"$SSH_USER@$SSH_HOST"
"rm -f /tmp/poc-deploy/secrets.decrypted.env"
- |
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
"$SSH_USER@$SSH_HOST" "chmod +x /tmp/poc-deploy/deploy-compose"
- |
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
"$SSH_USER@$SSH_HOST" "/tmp/poc-deploy/deploy-compose"
- |
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new \
"$SSH_USER@$SSH_HOST" "rm -f /tmp/poc-deploy/secrets.decrypted.env"
- echo "Deployment finished."
when:
event: [deployment, manual]