summaryrefslogtreecommitdiffstats
path: root/jjb/xci
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/xci')
-rwxr-xr-xjjb/xci/xci-run-functest.sh11
-rwxr-xr-xjjb/xci/xci-set-scenario.sh19
2 files changed, 14 insertions, 16 deletions
diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh
index 78b7d442c..7fb0be9b9 100755
--- a/jjb/xci/xci-run-functest.sh
+++ b/jjb/xci/xci-run-functest.sh
@@ -24,12 +24,6 @@ if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
exit 0
fi
-# skip the healthcheck if the scenario is Kubernetes scenario
-if [[ "$DEPLOY_SCENARIO" =~ k8 ]]; then
- echo "Skipping the healthcheck!"
- exit 0
-fi
-
# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since
# the project where the scenario is coming from is cloned and the patch checked out to the
# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM
@@ -50,9 +44,10 @@ if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENT
fi
# set XCI_VENV for ansible
-export XCI_VENV=/home/devuser/releng-xci/venv
+export XCI_PATH=/home/devuser/releng-xci
+export XCI_VENV=${XCI_PATH}/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"
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; source ${XCI_PATH}/.cache/xci.env && 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"
# Record exit code
diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh
index 3e64ab140..8ef525496 100755
--- a/jjb/xci/xci-set-scenario.sh
+++ b/jjb/xci/xci-set-scenario.sh
@@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-set -o errexit
set -o pipefail
#----------------------------------------------------------------------
@@ -97,22 +96,26 @@ function determine_generic_scenario() {
# get the changeset
cd $WORKSPACE
SCENARIOS=$(git diff HEAD^..HEAD --name-only -- 'xci/scenarios' | cut -d "/" -f 3 | uniq)
- # We need to set default scenario for changes that do not mess with scenarios
- NO_SCENARIOS=$(git diff HEAD^..HEAD --name-only | grep -v 'xci/scenarios' | cut -d "/" -f 3 | uniq)
+ # We need to set default scenario for changes that mess with installers
+ INSTALLERS=$(git diff HEAD^..HEAD --name-only -- 'xci/installer' | cut -d "/" -f 3 | uniq)
for CHANGED_SCENARIO in $SCENARIOS; do
- [[ ${DEPLOY_SCENARIO[@]} =~ $CHANGED_SCENARIO ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]=$CHANGED_SCENARIO
+ DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]=$CHANGED_SCENARIO
done
- for CHANGED_FILE in $NO_SCENARIOS; do
- case $CHANGED_FILE in
+ for CHANGED_INSTALLER in $INSTALLERS; do
+ case $CHANGED_INSTALLER in
kubespray)
- [[ ${DEPLOY_SCENARIO[@]} =~ "k8-nosdn-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='k8-nosdn-nofeature'
+ DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='k8-nosdn-nofeature'
;;
# Default case (including OSA changes)
*)
- [[ ${DEPLOY_SCENARIO[@]} =~ "os-nosdn-nofeature" ]] || DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
+ DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
;;
esac
done
+ # For all other changes, we only need to set a default scenario if it's not set already
+ if git diff HEAD^..HEAD --name-only | grep -q -v 'xci/installer\|xci/scenario'; then
+ [[ ${#DEPLOY_SCENARIO[@]} -gt 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
+ fi
# extract releng-xci sha
XCI_SHA=$(cd $WORKSPACE && git rev-parse HEAD)