<commit_before>set -e
echo ======== UPLOAD CLOUD IMAGES

export FULL_HASH=$(grep -o -E '[0-9a-f]{40}_[0-9a-f]{8}' < /etc/yum.repos.d/delorean.repo)

# If I try to build images as upstream ( in /home/jenkins ) something will go wrong
# we leave quickstart build in the default location. it proved to work
pushd /var/lib/oooq-images/$RELEASE

ls *.tar
chmod 600 $SSH_KEY
export RSYNC_RSH="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i $SSH_KEY"
rsync_cmd="rsync --verbose --archive --delay-updates --relative"
UPLOAD_URL=<EMAIL>:/var/www/html/images/$RELEASE/delorean/tripleo-upstream
mkdir $FULL_HASH
mv overcloud-full.tar overcloud-full.tar.md5 $FULL_HASH
mv ironic-python-agent.tar $FULL_HASH/ipa_images.tar
mv ironic-python-agent.tar.md5 $FULL_HASH/ipa_images.tar.md5

$rsync_cmd $FULL_HASH $UPLOAD_URL
$rsync_cmd --delete --include 'testing**' --exclude '*' ./ $UPLOAD_URL/
# push testing symlink so sub-jobs know what to test
# but only after all images are uploaded
ln -s $FULL_HASH testing
rsync -av testing $UPLOAD_URL/

popd
echo ======== UPLOAD CLOUD IMAGES COMPLETE<commit_msg>Images are in the home dir not /var/lib<commit_after>set -e
echo ======== UPLOAD CLOUD IMAGES

export FULL_HASH=$(grep -o -E '[0-9a-f]{40}_[0-9a-f]{8}' < /etc/yum.repos.d/delorean.repo)

pushd $HOME

ls *.tar
chmod 600 $SSH_KEY
export RSYNC_RSH="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i $SSH_KEY"
rsync_cmd="rsync --verbose --archive --delay-updates --relative"
UPLOAD_URL=<EMAIL>:/var/www/html/images/$RELEASE/delorean/tripleo-upstream
mkdir $FULL_HASH
mv overcloud-full.tar overcloud-full.tar.md5 $FULL_HASH
mv ironic-python-agent.tar $FULL_HASH/ipa_images.tar
mv ironic-python-agent.tar.md5 $FULL_HASH/ipa_images.tar.md5

$rsync_cmd $FULL_HASH $UPLOAD_URL
$rsync_cmd --delete --include 'testing**' --exclude '*' ./ $UPLOAD_URL/
# push testing symlink so sub-jobs know what to test
# but only after all images are uploaded
ln -s $FULL_HASH testing
rsync -av testing $UPLOAD_URL/

popd
echo ======== UPLOAD CLOUD IMAGES COMPLETE
{'fraction_non_alphanumeric': 0.1396025206010664, 'fraction_numerical': 0.012603005332040717, 'mean_word_length': 4.578378378378378, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3395159', 'n_tokens_mistral': 823, 'n_tokens_neox': 811, 'n_words': 200}