Alex | a0053b9 | 2022-10-14 16:38:28 -0500 | [diff] [blame] | 1 | #!/bin/bash |
pkazlenka | 4690e83 | 2024-10-24 13:28:37 +0200 | [diff] [blame] | 2 | |
| 3 | . "$(dirname "$0")/functions.sh" |
Alex | a0053b9 | 2022-10-14 16:38:28 -0500 | [diff] [blame] | 4 | ## |
| 5 | echo "### Checking rally environments" |
| 6 | status=$(kubectl -n qa-space get pod | grep rally | tr -s " " | cut -d' ' -f3) |
| 7 | if [ ${status} != "Running" ]; then |
| 8 | echo "# 'rally' container is not Running" |
| 9 | echo "# Consider creating resources and/or creating environments" |
| 10 | exit 1 |
| 11 | fi |
| 12 | |
| 13 | ### |
| 14 | if [ -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 |
| 17 | else |
| 18 | echo "# Running k8s performance tests" |
Alex | 876e93a | 2022-12-21 12:02:13 -0600 | [diff] [blame] | 19 | kubectl exec -n qa-space --stdin rally -- rally env use kubernetes |
Alex | c85212b | 2022-11-08 12:27:01 -0600 | [diff] [blame] | 20 | kubectl exec -n qa-space --stdin rally -- rally task start /rally/rally-files/k8s-mos-scn-i100c5.yaml |
Alex | a0053b9 | 2022-10-14 16:38:28 -0500 | [diff] [blame] | 21 | # generate report |
| 22 | echo "# Generating report" |
pkazlenka | 4690e83 | 2024-10-24 13:28:37 +0200 | [diff] [blame] | 23 | fname="$MY_CLIENTSHORTNAME-mos-k8s-perf-$(get_timestamp).html" |
Alex | a0053b9 | 2022-10-14 16:38:28 -0500 | [diff] [blame] | 24 | 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} |
pkazlenka | 4690e83 | 2024-10-24 13:28:37 +0200 | [diff] [blame] | 25 | kubectl cp qa-space/rally:/rally/${fname} "${MY_PROJFOLDER}/reports/${fname}" |
| 26 | update_latest_report_to "${MY_PROJFOLDER}/reports/${fname}" |
Alex | a0053b9 | 2022-10-14 16:38:28 -0500 | [diff] [blame] | 27 | fi |