fix: build remote script with echo lines instead of heredoc
This commit is contained in:
+15
-16
@@ -55,22 +55,21 @@ steps:
|
|||||||
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
|
ssh -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
|
||||||
"$SSH_USER@$SSH_HOST"
|
"$SSH_USER@$SSH_HOST"
|
||||||
"mkdir -p /tmp/poc-deploy"
|
"mkdir -p /tmp/poc-deploy"
|
||||||
- |
|
- echo "#!/bin/sh" > /tmp/deploy-bundle/run-deploy.sh
|
||||||
cat > /tmp/deploy-bundle/run-deploy.sh <<'SCRIPT'
|
- echo "set -e" >> /tmp/deploy-bundle/run-deploy.sh
|
||||||
#!/bin/sh
|
- echo "set -a" >> /tmp/deploy-bundle/run-deploy.sh
|
||||||
set -e
|
- echo ". /tmp/poc-deploy/release.env" >> /tmp/deploy-bundle/run-deploy.sh
|
||||||
set -a
|
- echo "set +a" >> /tmp/deploy-bundle/run-deploy.sh
|
||||||
. /tmp/poc-deploy/release.env
|
- >-
|
||||||
set +a
|
echo "docker compose --project-directory /tmp/poc-deploy -f
|
||||||
docker compose --project-directory /tmp/poc-deploy \
|
/tmp/poc-deploy/compose.yaml --env-file
|
||||||
-f /tmp/poc-deploy/compose.yaml \
|
/tmp/poc-deploy/secrets.decrypted.env pull" >> /tmp/deploy-bundle/run-deploy.sh
|
||||||
--env-file /tmp/poc-deploy/secrets.decrypted.env \
|
- >-
|
||||||
pull
|
echo "docker compose --project-directory /tmp/poc-deploy -f
|
||||||
docker compose --project-directory /tmp/poc-deploy \
|
/tmp/poc-deploy/compose.yaml --env-file
|
||||||
-f /tmp/poc-deploy/compose.yaml \
|
/tmp/poc-deploy/secrets.decrypted.env up -d --remove-orphans"
|
||||||
--env-file /tmp/poc-deploy/secrets.decrypted.env \
|
>> /tmp/deploy-bundle/run-deploy.sh
|
||||||
up -d --remove-orphans
|
- cat /tmp/deploy-bundle/run-deploy.sh
|
||||||
SCRIPT
|
|
||||||
- >-
|
- >-
|
||||||
scp -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
|
scp -i /tmp/ssh/id_deploy -o StrictHostKeyChecking=accept-new
|
||||||
compose.yaml release.env secrets.decrypted.env run-deploy.sh
|
compose.yaml release.env secrets.decrypted.env run-deploy.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user