blob: 58c785450fbf0a3cb6c3977b03bafde96f2d11aa [file] [log] [blame]
Anna Arhipovab80f23b2022-10-05 21:45:35 +02001#!/bin/bash
2
3. ${CUSTOM_REPO_VENV_PATH}/bin/activate
4
Anna Arhipova8f0fba42023-07-10 09:53:21 +02005set -eo pipefail;
Anna Arhipovab80f23b2022-10-05 21:45:35 +02006
7if [ -z "${DATE}" ]; then
8 d=$(date +%Y-%m-%d)
9 export DATE_REPORT="$(date +%Y-%m-%d)"
10else
11 export DATE_REPORT=${DATE}
12fi
13
14export TESTRAIL_URL="https://mirantis.testrail.com"
15#export TESTRAIL_USER_EMAIL="drivetrain-eng@mirantis.com"
16#export TESTRAIL_USER_KEY=""
17export TESTRAIL_PROJECT='Mirantis Cloud Platform'
18#export JIRA_USER="mcp-qa-bot@mirantis.com"
19#echo $JIRA_PWD
20######### Run Report Generator ##########
21
22for day in $DATE_REPORT; do
23
24if [ -z "${PLAN_NAME}" ]; then
25 export TESTRAIL_PLAN="[2019.2.0-update]System-${REPOSITORY_SUITE}-"${day}
26else
27 export TESTRAIL_PLAN=${PLAN_NAME}
28 echo ${PLAN_NAME}
29fi
30
Anna Arhipova8f0fba42023-07-10 09:53:21 +020031[ -d ${VENV_PATH} ] || virtualenv ${VENV_PATH}
Anna Arhipovab80f23b2022-10-05 21:45:35 +020032. ${VENV_PATH}/bin/activate
Anna Arhipova8f0fba42023-07-10 09:53:21 +020033pip install testrail==0.3.14 jira==2.0.0 functools32==3.2.3.post2
Anna Arhipovab80f23b2022-10-05 21:45:35 +020034
35python tcp_tests/report.py create-report \
36 --testrail-host "$TESTRAIL_URL" \
37 --testrail-user "$TESTRAIL_USER_EMAIL" \
38 --testrail-user-key "$TESTRAIL_USER_KEY" \
39 --testrail-plan $TESTRAIL_PLAN \
40 --testrail-project "$TESTRAIL_PROJECT" \
41 --out-type html \
42 --push-to-testrail \
43 --sort-by fails \
44 --jira-host https://mirantis.jira.com/ \
45 --jira-user $JIRA_USER \
46 --jira-password $JIRA_PWD > ${day}_system_bug_report_$(date +%Y%m%d%H%M%S).html && ret=0 || ret=1
47
48echo "Report for ${TESTRAIL_PLAN} finished with ${ret}"
49
50#export TESTRAIL_PLAN="[MCP1.1]BVT-"${day}
51
52#python tcp-qa/tcp_tests/report.py create-report \
53# --testrail-host "$TESTRAIL_URL" \
54# --testrail-user "$TESTRAIL_USER_EMAIL" \
55# --testrail-user-key "$TESTRAIL_USER_KEY" \
56# --testrail-plan $TESTRAIL_PLAN \
57# --testrail-project "$TESTRAIL_PROJECT" \
58# --out-type html \
59# --push-to-testrail \
60# --sort-by fails \
61# --jira-host https://mirantis.jira.com/ \
62# --jira-user $JIRA_USER \
63# --jira-password $JIRA_PWD > ${day}_bvt_bug_report_$(date +%Y%m%d%H%M%S).html && ret=0 || ret=1
64
65#echo "Report for ${TESTRAIL_PLAN} finished with ${ret}"
66
67done