blob: 549428d855762de141963fbf6502913a45811cb3 [file] [log] [blame]
Alexa0053b92022-10-14 16:38:28 -05001#!/bin/bash
pkazlenka4690e832024-10-24 13:28:37 +02002
3. "$(dirname "$0")/functions.sh"
Alexa0053b92022-10-14 16:38:28 -05004##
5echo "### Checking rally environments"
6status=$(kubectl -n qa-space get pod | grep rally | tr -s " " | cut -d' ' -f3)
7if [ ${status} != "Running" ]; then
8 echo "# 'rally' container is not Running"
9 echo "# Consider creating resources and/or creating environments"
10 exit 1
11fi
12
13###
14if [ -z $(kubectl exec -n qa-space --stdin rally -- rally env list | grep kubernetes | cut -d' ' -f2) ]; then
15 echo "# Kubernetes env not found. Please, run 'create-rally-deployments.sh'"
16 kubectl exec -n qa-space --stdin rally -- rally env list
17else
18 echo "# Running k8s performance tests"
Alex876e93a2022-12-21 12:02:13 -060019 kubectl exec -n qa-space --stdin rally -- rally env use kubernetes
Alexc85212b2022-11-08 12:27:01 -060020 kubectl exec -n qa-space --stdin rally -- rally task start /rally/rally-files/k8s-mos-scn-i100c5.yaml
Alexa0053b92022-10-14 16:38:28 -050021 # generate report
22 echo "# Generating report"
pkazlenka4690e832024-10-24 13:28:37 +020023 fname="$MY_CLIENTSHORTNAME-mos-k8s-perf-$(get_timestamp).html"
Alexa0053b92022-10-14 16:38:28 -050024 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}
pkazlenka4690e832024-10-24 13:28:37 +020025 kubectl cp qa-space/rally:/rally/${fname} "${MY_PROJFOLDER}/reports/${fname}"
26 update_latest_report_to "${MY_PROJFOLDER}/reports/${fname}"
Alexa0053b92022-10-14 16:38:28 -050027fi