If we don't clear the cache, the script errors out with the following:
fatal: destination path '/root/releng-xci/.cache/repos/openstack-ansible-tests'
already exists and is not an empty directory
Change-Id: I22111ed655a4c6790f808155968deb2fd3828e41
Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
# Extract role from scenario information
local testing_role=$(sed -n "/^- scenario: ${DEPLOY_SCENARIO}/,/^$/p" ${XCI_PATH}/xci/opnfv-scenario-requirements.yml | grep role | rev | cut -d '/' -f -1 | rev)
+ # clear XCI_CACHE
+ rm -rf ${XCI_CACHE}/repos/openstack-ansible-tests
+
# Clone OSA rules too
git clone --quiet --depth 1 https://github.com/openstack/openstack-ansible-tests.git \
${XCI_CACHE}/repos/openstack-ansible-tests