From 0951024fa50d44208fb19c0c71cc020fc95a270e Mon Sep 17 00:00:00 2001 From: Nicholas Kumia Date: Mon, 7 Aug 2023 11:47:09 -0400 Subject: [PATCH] update/fix: monitor logs.. show all logs in output the 'configure-postgis.py' script has some questionable stuff, so silence it --- .profile | 8 +++++++- tools/monitor_cf_logs.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.profile b/.profile index 117824f3..7232c9d2 100755 --- a/.profile +++ b/.profile @@ -1,5 +1,11 @@ #!/bin/bash +############################################################################## +# NOTE: When adding commands to this file, be mindful of sensitive output. +# Since these logs are publicly available in github actions, we don't want +# to leak anything. +############################################################################## + set -o errexit set -o pipefail @@ -146,7 +152,7 @@ echo "$SAML2_CERTIFICATE" > $CKANEXT__SAML2AUTH__CERT_FILE_PATH # Setting up PostGIS echo Setting up PostGIS -DATABASE_URL=$CKAN_SQLALCHEMY_URL python3 configure-postgis.py +DATABASE_URL=$CKAN_SQLALCHEMY_URL python3 configure-postgis.py >/dev/null 2>&1 # Edit the config file to use our values export CKAN_INI="${HOME}/ckan/setup/ckan.ini" diff --git a/tools/monitor_cf_logs.sh b/tools/monitor_cf_logs.sh index b3f1ab1e..60d0c49f 100755 --- a/tools/monitor_cf_logs.sh +++ b/tools/monitor_cf_logs.sh @@ -8,7 +8,7 @@ app_to_monitor=$1 task_to_monitor=$2 while read -r line ; do - echo "$line" | grep --line-buffered " DEBUG \| INFO \| WARNING \| ERROR " + echo "$line" if echo "$line" | grep "OUT Exit status 0"; then exit 0 elif echo "$line" | grep "OUT Exit status"; then