run it from the shell script

This commit is contained in:
pokeeffe-molecula 2022-02-16 17:01:41 -06:00
parent 1f0799e887
commit 08f5454f6b
2 changed files with 25 additions and 7 deletions

View file

@ -16,10 +16,6 @@ perf_able:
- fbsmoke
before_script:
- apt-get update && apt-get install -y gnupg software-properties-common curl git
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69
- echo "deb https://dl.k6.io/deb stable main" | tee /etc/apt/sources.list.d/k6.list
- apt-get update
- apt-get install k6
- curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add -
- apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
- apt-get update && apt-get install terraform
@ -46,8 +42,6 @@ perf_able:
script:
- ./qa/scripts/perf/able/ableSetup.sh
- ./qa/scripts/perf/able/ableTest.sh
- echo "executing local k6 in k6 container..."
- k6 run ./qa/scripts/perf/able/script.js
after_script:
- ./qa/scripts/perf/able/ableTeardown.sh
needs:

View file

@ -8,5 +8,29 @@ echo "using INGESTNODE0 ${INGESTNODE0}"
DATANODE0=$(cat ./qa/tf/gauntlet/able/outputs.json | jq -r '[.data_node_ips][0]["value"][0]')
echo "using DATANODE0 ${DATANODE0}"
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69"
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "echo 'deb https://dl.k6.io/deb stable main' | sudo tee /etc/apt/sources.list.d/k6.list"
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "sudo apt-get update"
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "sudo apt-get install k6"
echo "Done."
echo "Copying tests to remote"
scp -r -i ~/.ssh/gitlab-featurebase-ci.pem ./qa/scripts/perf/able/*.js ec2-user@${INGESTNODE0}:/data
if (( $? != 0 ))
then
echo "Copy failed"
exit 1
fi
# run smoke test
echo "Running smoke test..."
ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "k6 run /data/script.js"
ABLETESTRESULT=$?
if (( $ABLETESTRESULT != 0 ))
then
echo "able perf test complete with failures"
else
echo "able test complete"
fi
exit $ABLETESTRESULT