From b574a6f8da401da067519991a5b2461530c3ddc3 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Fri, 23 Apr 2021 23:17:10 +0300 Subject: [PATCH] Remove Python tracebacks. Using Docker Compose over SSH causes errors, but it's handled. The tracebacks just make it harder to follow what's happening. --- deploy | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy b/deploy index 58e5f73..1168f38 100755 --- a/deploy +++ b/deploy @@ -1,8 +1,12 @@ #!/bin/sh set -eu +_docker_compose() { + docker-compose "$@" 2>&1 | sed '/^ File /,+1d' +} + _check() { - containers="$(until docker-compose ps -q; do true; done)" + containers="$(until _docker_compose ps -q; do true; done)" # shellcheck disable=SC2086 docker container inspect --format '{{ .State.Health.Status }}' $containers | grep -v '^healthy$' } @@ -11,7 +15,7 @@ _deploy() { echo "Deploying to $1" >&2 export DOCKER_HOST="ssh://$1" export RUNNER_NAME="$1" - until docker-compose up --detach --remove-orphans ; do true; done + until _docker_compose up --detach --remove-orphans ; do true; done # shellcheck disable=SC2034 for i in $(seq 12) do -- GitLab