fix: build remote script with echo lines instead of heredoc
ci/woodpecker/push/deploy Pipeline was successful
ci/woodpecker/deployment/deploy Pipeline failed

This commit is contained in:
2026-09-18 21:50:41 +02:00
parent 886bbc6a0b
commit a28e203c20
+15 -16
View File
@@ -55,22 +55,21 @@ steps:
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
"$SSH_USER@$SSH_HOST"
"mkdir -p /tmp/poc-deploy"
- |
cat > /tmp/deploy-bundle/run-deploy.sh <<'SCRIPT'
#!/bin/sh
set -e
set -a
. /tmp/poc-deploy/release.env
set +a
docker compose --project-directory /tmp/poc-deploy \
-f /tmp/poc-deploy/compose.yaml \
--env-file /tmp/poc-deploy/secrets.decrypted.env \
pull
docker compose --project-directory /tmp/poc-deploy \
-f /tmp/poc-deploy/compose.yaml \
--env-file /tmp/poc-deploy/secrets.decrypted.env \
up -d --remove-orphans
SCRIPT
- echo "#!/bin/sh" > /tmp/deploy-bundle/run-deploy.sh
- echo "set -e" >> /tmp/deploy-bundle/run-deploy.sh
- echo "set -a" >> /tmp/deploy-bundle/run-deploy.sh
- echo ". /tmp/poc-deploy/release.env" >> /tmp/deploy-bundle/run-deploy.sh
- echo "set +a" >> /tmp/deploy-bundle/run-deploy.sh
- >-
echo "docker compose --project-directory /tmp/poc-deploy -f
/tmp/poc-deploy/compose.yaml --env-file
/tmp/poc-deploy/secrets.decrypted.env pull" >> /tmp/deploy-bundle/run-deploy.sh
- >-
echo "docker compose --project-directory /tmp/poc-deploy -f
/tmp/poc-deploy/compose.yaml --env-file
/tmp/poc-deploy/secrets.decrypted.env up -d --remove-orphans"
>> /tmp/deploy-bundle/run-deploy.sh
- cat /tmp/deploy-bundle/run-deploy.sh
- >-
scp -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
compose.yaml release.env secrets.decrypted.env run-deploy.sh