Browse Source

Use file descriptor 3 for main deployment loop

Before this, some deployment scripts would interact with STDIN and that would cause this loop to skip some elements. By using descriptor 3 we avoid clashing with the very common stdin and stdout.
pull/6241/head
Jacobo de Vera 2 months ago
committed by tomo
parent
commit
5767c01845
No known key found for this signature in database GPG Key ID: 6826163BFB606E85
  1. 4
      deploy/multideploy.sh

4
deploy/multideploy.sh

@ -235,7 +235,7 @@ _deploy_services() {
_failedServices=""
_failedCount=0
while read -r _service; do
while read -r _service <&3; do
_debug2 "Service" "$_service"
_hook=$(yq e ".services[] | select(.name == \"$_service\").hook" "$_deploy_file")
_envs=$(yq e ".services[] | select(.name == \"$_service\").environment" "$_deploy_file")
@ -246,7 +246,7 @@ _deploy_services() {
_failedCount=$((_failedCount + 1))
fi
_clear_envs "$_envs"
done < "$_tempfile"
done 3< "$_tempfile"
_debug3 "Failed services" "$_failedServices"
_debug2 "Failed count" "$_failedCount"

Loading…
Cancel
Save