Skip to content

Commit

Permalink
fix: remove all the debug logging and echo timestamp as final line
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Aug 10, 2024
1 parent a64b5d9 commit c549c66
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions concourse/out
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ payload=$(mktemp /tmp/resource-in.XXXXXX)

cat > "${payload}" <&0

echo "Payload: $(cat ${payload})"

timestamp="$(jq -n "{version:{timestamp:\"$(date +%s)\"}}")"

echo "Timestamp: ${timestamp}"

disable="$(jq -r '.source.disable' < "${payload}")"
if [[ "$disable" == "true" ]]
then
Expand All @@ -41,18 +37,6 @@ suppress_embeds="$(jq '(.params.flags.suppress_embeds // "false")' < "${payload}
suppress_notifications="$(jq '(.params.flags.suppress_notifications // "false")' < "${payload}")"
verbose="$(jq '(.params.verbose // "false")' < "${payload}")"

echo "webhook_url: ${webhook_url}"
echo "allow_insecure: ${allow_insecure}"
echo "proxy: ${proxy}"
echo "content: ${content}"
echo "username: ${username}"
echo "avatar_url: ${avatar_url}"
echo "allowed_role_mentions: ${allowed_role_mentions}"
echo "allowed_user_mentions: ${allowed_user_mentions}"
echo "suppress_embeds: ${suppress_embeds}"
echo "suppress_notifications: ${suppress_notifications}"
echo "verbose: ${verbose}"

allowed_role_mentions_options=""

allowed_roles_count=$(echo $allowed_role_mentions | jq '. | length')
Expand All @@ -73,15 +57,6 @@ if [ $allowed_users_count -gt 0 ]; then
done
fi

echo "allowed_role_mentions_options: ${allowed_role_mentions_options}"
echo "allowed_user_mentions_options: ${allowed_user_mentions_options}"

echo "--------------------------------------------------------------------------------------"

printenv

echo "--------------------------------------------------------------------------------------"

node /usr/src/app/dist/index.js \
--webhook-url "${webhook_url}" \
--allow-insecure "${allow_insecure}" \
Expand All @@ -94,3 +69,5 @@ node /usr/src/app/dist/index.js \
--suppress-embeds "${suppress_embeds}" \
--suppress-notifications "${suppress_notifications}" \
--verbose "${verbose}"

echo "$timestamp" | jq -s add >&3

0 comments on commit c549c66

Please sign in to comment.