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