From 426b48dcc6d46da9ba988903387d1de498eecefd Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Sat, 24 Mar 2018 17:33:52 -0700 Subject: [PATCH] xci: Run ansible within venv Change-Id: I20eb3c89c199b09ce839ae4ef6dfdcdd34dc58cf Signed-off-by: Fatih Degirmenci --- jjb/xci/xci-run-functest.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh index 2e343631b..aa98e07aa 100755 --- a/jjb/xci/xci-run-functest.sh +++ b/jjb/xci/xci-run-functest.sh @@ -49,7 +49,10 @@ if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENT exit 0 fi -ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "cd releng-xci/xci && PATH=/home/devuser/.local/bin:$PATH ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml" +# set XCI_VENV for ansible +export XCI_VENV=/home/devuser/releng-xci/venv + +ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; cd releng-xci/xci && ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml" echo "Running functest" ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/run-functest.sh" echo "Functest log" -- 2.16.6