Skip to content

Commit 6f5ae93

Browse files
committed
ASC-978 Update "rpc-zigzag" Version
Update the script to pin to the 1.0 series for "rpc-zigzag". Also, added a variable for the "rpc-zigzag" PyPI package at the top so it can be easily updated in the future without hunting around in the script. The ZigZag config file is contained as a heredoc within the script which is written out to disk at runtime.
1 parent 6cd89ce commit 6f5ae93

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

gating/check/post_send_junit_to_qtest.sh

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,37 @@ set -x
99
export QTEST_API_TOKEN=${RPC_ASC_QTEST_API_TOKEN}
1010
VENV_NAME="venv-qtest"
1111
VENV_PATH="${WORKSPACE}/${VENV_NAME}"
12+
ZIGZAG_PYPI_PACKAGE="rpc-zigzag~=1.0"
13+
ZIGZAG_CONFIG_FILE="asc_sys-tests_zigzag_config.json"
1214

1315
if [[ ${RE_JOB_ACTION} == "system_staging" ]]; then
1416
PROJECT_ID="84820"
1517
else
1618
PROJECT_ID="76551"
1719
fi
1820

21+
## ZigZag Config -------------------------------------------------------------
22+
cat <<-EOF >$ZIGZAG_CONFIG_FILE
23+
{
24+
"zigzag": {
25+
"test_cycle": "{{ RPC_PRODUCT_RELEASE }}",
26+
"project_id": "$PROJECT_ID",
27+
"module_hierarchy": [
28+
"{{ JOB_NAME }}",
29+
"{{ MOLECULE_TEST_REPO }}.{{ MOLECULE_SCENARIO_NAME }}",
30+
"{{zz_testcase_class}}"
31+
],
32+
"path_to_test_exec_dir": "/molecule/{{ MOLECULE_SCENARIO_NAME }}",
33+
"build_url": "{{ BUILD_URL }}",
34+
"build_number": "{{ BUILD_NUMBER }}",
35+
"test_repo_name": "{{ MOLECULE_TEST_REPO }}",
36+
"test_branch": "{{ RE_JOB_BRANCH }}",
37+
"test_fork": "rcbops",
38+
"test_commit": "{{ MOLECULE_GIT_COMMIT }}"
39+
}
40+
}
41+
EOF
42+
1943
## Functions -----------------------------------------------------------------
2044

2145
source $(dirname ${0})/../../scripts/functions.sh
@@ -31,7 +55,7 @@ source "${VENV_PATH}/bin/activate"
3155
VENV_PIP="${VENV_PATH}/bin/pip"
3256

3357
# Install zigzag from PyPI
34-
${VENV_PIP} install rpc-zigzag
58+
${VENV_PIP} install "${ZIGZAG_PYPI_PACKAGE}"
3559

3660
# Search for xml files in RE_HOOK_RESULT_DIR
3761
xml_files=()
@@ -44,7 +68,7 @@ echo "Attempting upload of ${#xml_files[@]} XML files"
4468
printf '%s\n' "${xml_files[@]}"
4569
for i in "${xml_files[@]}"; do
4670
# Use <TOOL NAME> to process and upload to qtest
47-
if zigzag $i ${PROJECT_ID}; then
71+
if zigzag $ZIGZAG_CONFIG_FILE $i; then
4872
echo "Upload Success: $i"
4973
else
5074
echo "Upload Failure: $i"

0 commit comments

Comments
 (0)