diff --git a/gating/check/post_send_junit_to_qtest.sh b/gating/check/post_send_junit_to_qtest.sh index 9b0c6d7b5..e7ddc81bb 100755 --- a/gating/check/post_send_junit_to_qtest.sh +++ b/gating/check/post_send_junit_to_qtest.sh @@ -9,6 +9,8 @@ set -x export QTEST_API_TOKEN=${RPC_ASC_QTEST_API_TOKEN} VENV_NAME="venv-qtest" VENV_PATH="${WORKSPACE}/${VENV_NAME}" +ZIGZAG_PYPI_PACKAGE="rpc-zigzag~=1.0" +ZIGZAG_CONFIG_FILE="asc_sys-tests_zigzag_config.json" if [[ ${RE_JOB_ACTION} == "system_staging" ]]; then PROJECT_ID="84820" @@ -16,6 +18,28 @@ else PROJECT_ID="76551" fi +## ZigZag Config ------------------------------------------------------------- +cat <<-EOF >$ZIGZAG_CONFIG_FILE +{ + "zigzag": { + "test_cycle": "{{ RPC_PRODUCT_RELEASE }}", + "project_id": "$PROJECT_ID", + "module_hierarchy": [ + "{{ JOB_NAME }}", + "{{ MOLECULE_TEST_REPO }}.{{ MOLECULE_SCENARIO_NAME }}", + "{{zz_testcase_class}}" + ], + "path_to_test_exec_dir": "/molecule/{{ MOLECULE_SCENARIO_NAME }}", + "build_url": "{{ BUILD_URL }}", + "build_number": "{{ BUILD_NUMBER }}", + "test_repo_name": "{{ MOLECULE_TEST_REPO }}", + "test_branch": "{{ RE_JOB_BRANCH }}", + "test_fork": "rcbops", + "test_commit": "{{ MOLECULE_GIT_COMMIT }}" + } +} +EOF + ## Functions ----------------------------------------------------------------- source $(dirname ${0})/../../scripts/functions.sh @@ -31,7 +55,7 @@ source "${VENV_PATH}/bin/activate" VENV_PIP="${VENV_PATH}/bin/pip" # Install zigzag from PyPI -${VENV_PIP} install rpc-zigzag +${VENV_PIP} install "${ZIGZAG_PYPI_PACKAGE}" # Search for xml files in RE_HOOK_RESULT_DIR xml_files=() @@ -44,7 +68,7 @@ echo "Attempting upload of ${#xml_files[@]} XML files" printf '%s\n' "${xml_files[@]}" for i in "${xml_files[@]}"; do # Use to process and upload to qtest - if zigzag $i ${PROJECT_ID}; then + if zigzag $ZIGZAG_CONFIG_FILE $i; then echo "Upload Success: $i" else echo "Upload Failure: $i"