blob: c3cae141b290a07d32a8e21ea03bb1ea98ffbc67 [file] [log] [blame]
Alexa0053b92022-10-14 16:38:28 -05001#!/bin/bash
2##
3echo "### Checking rally environments"
4status=$(kubectl -n qa-space get pod | grep rally | tr -s " " | cut -d' ' -f3)
5if [ ${status} != "Running" ]; then
6 echo "# 'rally' container is not Running"
7 echo "# Consider creating resources and/or creating environments"
8 exit 1
9fi
10
11###
12if [ -z $(kubectl exec -n qa-space --stdin rally -- rally env list | grep kubernetes | cut -d' ' -f2) ]; then
13 echo "# Kubernetes env not found. Please, run 'create-rally-deployments.sh'"
14 kubectl exec -n qa-space --stdin rally -- rally env list
15else
16 echo "# Running k8s performance tests"
Alex876e93a2022-12-21 12:02:13 -060017 kubectl exec -n qa-space --stdin rally -- rally env use kubernetes
Alexc85212b2022-11-08 12:27:01 -060018 kubectl exec -n qa-space --stdin rally -- rally task start /rally/rally-files/k8s-mos-scn-i100c5.yaml
Alexa0053b92022-10-14 16:38:28 -050019 # generate report
20 echo "# Generating report"
21 fname=$MY_CLIENTSHORTNAME-mos-k8s-perf-latest.html
22 kubectl exec -n qa-space --stdin rally -- rally task report $(kubectl exec -n qa-space --stdin rally -- rally task list | grep kubernetes | cut -d' ' -f2 | tail -1) --html-static --out ${fname}
23 kubectl cp qa-space/rally:/rally/${fname} $MY_PROJFOLDER/reports/${fname}
24fi