Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASC-978 Update "rpc-zigzag" Version #3493

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions gating/check/post_send_junit_to_qtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,37 @@ 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"
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
Expand All @@ -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=()
Expand All @@ -44,7 +68,7 @@ echo "Attempting upload of ${#xml_files[@]} XML files"
printf '%s\n' "${xml_files[@]}"
for i in "${xml_files[@]}"; do
# Use <TOOL NAME> 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"
Expand Down
13 changes: 7 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ setenv =
# NOTE(cloudnull): This should be set to "master" as soon the gate is capable of
# setting this option.
OSA_RELEASE_BRANCH={env:OSA_RELEASE_BRANCH:master}
OSA_TEST_RELEASE=master
UPPER_CONSTRAINTS_FILE=https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h={env:OSA_TEST_RELEASE:master}
OSA_TEST_RELEASE=d90acf00b639496cd0669153534fe5588875f3ee
OSA_UPPER_CONSTRAINTS=377fde64ac16dc94da2e29e16a4102adcc081a6e
UPPER_CONSTRAINTS_FILE=https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h={env:OSA_UPPER_CONSTRAINTS:master}
OSA_TEST_DEPS=https://git.openstack.org/cgit/openstack/openstack-ansible-tests/plain/test-ansible-deps.txt?h={env:OSA_TEST_RELEASE:master}
OSA_ROLE_REQUIREMENTS=https://git.openstack.org/cgit/openstack/openstack-ansible/plain/ansible-role-requirements.yml?h={env:OSA_RELEASE_BRANCH:master}
basepython = python2.7
Expand Down Expand Up @@ -87,10 +88,10 @@ commands =
commands =
bash -c "if [ ! -d "{toxinidir}/tests/common" ]; then \
git clone https://git.openstack.org/openstack/openstack-ansible-tests {toxinidir}/tests/common; \
pushd {toxinidir}/tests/common; \
git checkout {env:OSA_TEST_RELEASE:master}; \
popd; \
fi"
fi; \
pushd {toxinidir}/tests/common; \
git checkout {env:OSA_TEST_RELEASE:master}; \
popd"


[testenv:pep8]
Expand Down