Merge "Remove Euphrates jobs"
authorAric Gardner <agardner@linuxfoundation.org>
Thu, 12 Apr 2018 17:04:28 +0000 (17:04 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 12 Apr 2018 17:04:28 +0000 (17:04 +0000)
jjb/functest/functest-alpine.sh
jjb/functest/functest-kubernetes-project-jobs.yml
jjb/functest/functest-project-jobs.yml
jjb/functest/xtesting-docker.yml
jjb/functest/xtesting-project-jobs.yml
jjb/xci/bifrost-verify.sh
jjb/xci/xci-run-functest.sh
jjb/xci/xci-set-scenario.sh

index 72b94bd..440b00a 100755 (executable)
@@ -28,13 +28,8 @@ check_os_deployment() {
 
 run_tiers() {
     tiers=$1
-    if [[ ${BRANCH##*/} == "stable/euphrates" ]]; then
-        cmd_opt="prepare_env start && run_tests -r -t all"
-        [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="prepare_env start && run_tests -t all"
-    else
-        cmd_opt="run_tests -r -t all"
-        [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all"
-    fi
+    cmd_opt="run_tests -r -t all"
+    [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all"
     ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
     echo 0 > ${ret_val_file}
 
@@ -58,11 +53,7 @@ run_tiers() {
 
 run_test() {
     test_name=$1
-    if [[ ${BRANCH##*/} == "stable/euphrates" ]]; then
-        cmd_opt="prepare_env start && run_tests -t ${test_name}"
-    else
-        cmd_opt="run_tests -t ${test_name}"
-    fi
+    cmd_opt="run_tests -t ${test_name}"
     ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
     echo 0 > ${ret_val_file}
     # Determine which Functest image should be used for the test case
@@ -115,11 +106,7 @@ elif [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then
     cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert"
 fi
 
-if [[ ${BRANCH} == "stable/euphrates" ]]; then
-    rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/openstack.creds"
-else
-    rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file"
-fi
+rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file"
 
 # Set iptables rule to allow forwarding return traffic for container
 if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then
index 5599906..7f8dd8d 100644 (file)
           branch: '{stream}'
           gs-pathname: ''
           disabled: false
-      - fraser:
-          branch: 'stable/{stream}'
-          gs-pathname: '/{stream}'
-          disabled: false
-      - euphrates:
+      - fraser: &fraser
           branch: 'stable/{stream}'
           gs-pathname: '/{stream}'
           disabled: false
index 3adf880..4468da7 100644 (file)
@@ -18,7 +18,7 @@
           branch: '{stream}'
           gs-pathname: ''
           disabled: false
-      - fraser:
+      - fraser: &fraser
           branch: 'stable/{stream}'
           gs-pathname: '/{stream}'
           disabled: false
index dc26344..251c395 100644 (file)
@@ -12,6 +12,9 @@
       - master:
           branch: '{stream}'
           disabled: false
+      - fraser:
+          branch: 'stable/{stream}'
+          disabled: false
 
     arch_tag:
       - 'amd64':
index bf08775..e109387 100644 (file)
@@ -18,7 +18,7 @@
           branch: '{stream}'
           gs-pathname: ''
           disabled: false
-      - euphrates:
+      - fraser: &fraser
           branch: 'stable/{stream}'
           gs-pathname: '/{stream}'
           disabled: false
index 9d524bc..c810212 100755 (executable)
@@ -27,6 +27,9 @@ set -o nounset
 set -o pipefail
 
 cd ~/bifrost
+# set path for XCI repository
+export XCI_PATH=~/bifrost/releng-xci
+
 # provision 3 VMs; xcimaster, controller, and compute
 ./scripts/bifrost-provision.sh | ts
 
index 7fb0be9..6d43c97 100755 (executable)
@@ -47,13 +47,27 @@ fi
 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; source ${XCI_PATH}/.cache/xci.env && 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; while read var; do declare -x \"\${var}\" 2>/dev/null; done < ${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
 functest_exit=$?
+
+case ${DEPLOY_SCENARIO[0]} in
+    os-*)
+        FUNCTEST_LOG=/root/results/functest.log
+        ;;
+    k8-*)
+        FUNCTEST_LOG=/root/results/functest-kubernetes.log
+        ;;
+    *)
+        echo "Unable to determine the installer. Exiting!"
+        exit 1
+        ;;
+esac
+
 echo "Functest log"
 echo "---------------------------------------------------------------------------------"
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat /root/results/functest.log"
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat $FUNCTEST_LOG"
 echo "---------------------------------------------------------------------------------"
 exit ${functest_exit}
index b591dd2..c28093d 100755 (executable)
@@ -96,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[@]} -eq 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
+    fi
 
     # extract releng-xci sha
     XCI_SHA=$(cd $WORKSPACE && git rev-parse HEAD)