<commit_before>#!/usr/bin/env bash
set -euxo pipefail

DB_URI=$(echo $VCAP_SERVICES | jq -r '.postgres[0].credentials.uri')
echo -n "${PUBKEY}" > /app/public.key
gpg2 --import /app/public.key
pg_dump "${DB_URI}" --no-acl --no-owner --clean --if-exists | gzip | \
  gpg2 --trust-model always -r "${RECIPIENT}" --out /app/"${DUMP_FILE_NAME}" --encrypt<commit_msg>Don't log DB service credentials to Jenkins<commit_after>#!/usr/bin/env bash
set -euxo pipefail

set +x  # Don't log credentials
DB_URI=$(echo $VCAP_SERVICES | jq -r '.postgres[0].credentials.uri')
set -x  # Restore logging
echo -n "${PUBKEY}" > /app/public.key
gpg2 --import /app/public.key
pg_dump "${DB_URI}" --no-acl --no-owner --clean --if-exists | gzip | \
  gpg2 --trust-model always -r "${RECIPIENT}" --out /app/"${DUMP_FILE_NAME}" --encrypt
{'fraction_non_alphanumeric': 0.19753086419753085, 'fraction_numerical': 0.007407407407407408, 'mean_word_length': 3.5819209039548023, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2731665', 'n_tokens_mistral': 322, 'n_tokens_neox': 310, 'n_words': 78}