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_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
|
||||
|
||||
Reference in New Issue
Block a user