Skip to content

Commit

Permalink
Merge pull request #1028 from GSA/monitor-all-logs
Browse files Browse the repository at this point in the history
Fix monitor logs script
  • Loading branch information
nickumia-reisys committed Aug 7, 2023
2 parents 0c641cd + 414b769 commit 497ce69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .profile
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tools/monitor_cf_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 497ce69

Please sign in to comment.