Alex | a0053b9 | 2022-10-14 16:38:28 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | ## |
| 3 | echo "### Checking rally environments" |
| 4 | status=$(kubectl -n qa-space get pod | grep rally | tr -s " " | cut -d' ' -f3) |
| 5 | if [ ${status} != "Running" ]; then |
| 6 | echo "# 'rally' container is not Running" |
| 7 | echo "# Consider creating resources and/or creating environments" |
| 8 | exit 1 |
| 9 | fi |
| 10 | |
| 11 | ### |
| 12 | if [ -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 |
| 15 | else |
| 16 | echo "# Running k8s performance tests" |
| 17 | #kubectl exec -n qa-space --stdin rally -- rally task start /rally/rally-files/k8s-mos-scn-i100c5.yaml |
| 18 | # generate report |
| 19 | echo "# Generating report" |
| 20 | fname=$MY_CLIENTSHORTNAME-mos-k8s-perf-latest.html |
| 21 | 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} |
| 22 | kubectl cp qa-space/rally:/rally/${fname} $MY_PROJFOLDER/reports/${fname} |
| 23 | fi |