From: Taseer Ahmed Date: Tue, 17 Apr 2018 14:10:38 +0000 (+0500) Subject: xci: lib-install: Clear XCI_CACHE prior to downloading openstack-ansible-tests X-Git-Tag: 6.0.0~27^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=8d0f54f3b85d12bd95347f1660fabf649036418f;p=releng-xci.git xci: lib-install: Clear XCI_CACHE prior to downloading openstack-ansible-tests 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 --- diff --git a/xci/files/install-lib.sh b/xci/files/install-lib.sh index 1a6c0b2f..14acab1b 100644 --- a/xci/files/install-lib.sh +++ b/xci/files/install-lib.sh @@ -148,6 +148,9 @@ ansible_lint() { # 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