22
33set -euo pipefail
44
5+ REPORT_EMAIL=${REPORT_EMAIL:- burak@ citusdata.com metin@ citusdata.com furkan@ citusdata.com}
6+ POSTGRES_GITREF=${POSTGRES_GITREF:- REL_11_STABLE}
7+ CITUS_GITREF=${CITUS_GITREF:- master}
8+
9+ echo " ENV:"
10+ echo " REPORT_EMAIL:" $REPORT_EMAIL
11+ echo " POSTGRES_GITREF:" $POSTGRES_GITREF
12+ echo " CITUS_GITREF:" $CITUS_GITREF
13+
14+ # when running in a tty wait for the human to press enter, this is to allow the human to verify the settings
15+ # when running as a crontab it will just continue
16+ if [ -t 1 ] ; then
17+ read -p " Press enter to continue"
18+ fi
19+
520# create a key pair just for valgrind tests and store it in valgrind-test.pem
621echo " Creating key pair..."
722key_name=valgrind_$RANDOM
@@ -16,9 +31,10 @@ valgrind_instance_id=$(aws ec2 run-instances \
1631 --instance-type r3.2xlarge \
1732 --key-name $key_name \
1833 --instance-initiated-shutdown-behavior terminate \
19- --user-data file:///usr/local/bin/ download-test-scripts \
34+ --user-data file://download-test-scripts \
2035 --query ' Instances[0].InstanceId' \
2136 --output text)
37+ echo " instance id:" $valgrind_instance_id
2238
2339# tag the instance as ValgrindTest
2440echo " Tagging the instance..."
@@ -41,7 +57,19 @@ valgrind_instance_ip=$(aws ec2 describe-instances \
4157# run valgrind tests
4258echo " Running the valgrind tests..."
4359echo " This will take hours, test results will be sent via e-mail."
44- ssh -o StrictHostKeyChecking=no -i $key_name .pem ubuntu@$valgrind_instance_ip " screen -d -m run-valgrind-tests"
60+ ssh \
61+ -o IdentitiesOnly=yes \
62+ -o StrictHostKeyChecking=no \
63+ -i $key_name .pem \
64+ ubuntu@$valgrind_instance_ip \
65+ REPORT_EMAIL=" ${REPORT_EMAIL} " \
66+ POSTGRES_GITREF=" ${POSTGRES_GITREF} " \
67+ CITUS_GITREF=" ${CITUS_GITREF} " \
68+ screen -d -m run-valgrind-tests
69+
70+ echo login:
71+ echo " " ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -i $key_name .pem ubuntu@$valgrind_instance_ip
72+ echo
4573
4674# delete the key pair after we are done with tests
4775aws ec2 delete-key-pair --key-name $key_name
0 commit comments