Merge "Remove euphrates from domino"
authorAric Gardner <agardner@linuxfoundation.org>
Thu, 12 Apr 2018 17:23:53 +0000 (17:23 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 12 Apr 2018 17:23:53 +0000 (17:23 +0000)
15 files changed:
jjb/barometer/barometer.yml
jjb/bottlenecks/bottlenecks-project-jobs.yml
jjb/calipso/calipso.yml
jjb/container4nfv/container4nfv-project.yml
jjb/daisy4nfv/daisy-daily-jobs.yml
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/global/installer-params.yml
jjb/global/releng-macros.yml
jjb/xci/bifrost-verify.sh
jjb/xci/xci-run-functest.sh
jjb/xci/xci-set-scenario.sh

index a8d314a..9217620 100644 (file)
           branch: 'stable/{stream}'
           gs-pathname: '/{stream}'
           disabled: false
-      - euphrates:
-          branch: 'stable/{stream}'
-          gs-pathname: '/{stream}'
-          disabled: false
 
 - job-template:
     name: 'barometer-verify-{stream}'
index bebac99..d4930d7 100644 (file)
           gs-pathname: '/{stream}'
           gs-packagepath: '/{stream}/{suite}'
           disabled: false
-      - euphrates:
-          branch: 'stable/{stream}'
-          gs-pathname: '/{stream}'
-          gs-packagepath: '/{stream}/{suite}'
-          disabled: false
 
     suite:
       - 'posca_stress_traffic'
index b855752..6701e7c 100644 (file)
@@ -15,9 +15,6 @@
           branch: 'stable/{stream}'
           gs-pathname: '/{stream}'
           disabled: false
-      - euphrates:
-          branch: 'stable/{stream}'
-          disabled: false
 
 - job-template:
     name: 'calipso-verify-{stream}'
index 4bd2a80..194a1a9 100644 (file)
           branch: 'stable/{stream}'
           gs-pathname: '/{stream}'
           disabled: false
-      - euphrates:
-          branch: 'stable/{stream}'
-          gs-pathname: '/{stream}'
-          disabled: false
 
 - job-template:
     name: 'container4nfv-verify-{stream}'
index 2eb27a6..0f2d917 100644 (file)
       - 'testapi-parameter'
       - 'daisy-project-parameter':
           gs-pathname: '{gs-pathname}'
+      - 'deploy-scenario'
 
     builders:
       - description-setter:
       - 'testapi-parameter'
       - 'daisy-project-parameter':
           gs-pathname: '{gs-pathname}'
+      - 'deploy-scenario'
       - string:
           name: DEPLOY_TIMEOUT
           default: '150'
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 683ef78..f663c45 100644 (file)
           name: EXTERNAL_NETWORK
           default: 'external'
           description: 'external network for test'
+
+- parameter:
+    name: 'deploy-scenario'
+    parameters:
+      - string:
+          name: DEPLOY_SCENARIO
+          default: 'os-nosdn-nofeature-ha'
+          description: "OPNFV deployment scenario"
index 205802f..d70e7e0 100644 (file)
           default: 'refs/heads/{branch}'
           description: "Default refspec needed for manually triggering."
 
+##
+# Reporting Deployment Results
+#
+# To report deployment results to
+# http://testresults.opnfv.org/test/#/deployresults, add the following
+# parameters, builders, and publishers to a deployment job:
+#
+#   parameters:
+#    - testapi-parameter
+#
+#   builders:
+#    - track-begin-timestamp
+#
+#   publishers:
+#    - report-provision-result
+#
+# Note: The following string parameter must also exist, as they are used
+#       when reporting the provision result:
+#
+#  * INSTALLER
+#  * INSTALLER_VERSION
+#  * DEPLOY_SCENARIO
+#
+# most installers include these but you should verify first before
+# adding the publisher, otherwise the deployment build may be marked
+# unstable.
+#
+##
 - parameter:
     name: testapi-parameter
     parameters:
           name: TESTAPI_URL
           default: 'http://testresults.opnfv.org/test/api/v1'
           description: "Default TestAPI URL, currently using v1"
-      - string:
-          name: DEPLOY_SCENARIO
-          default: 'os-nosdn-nofeature-ha'
-          description: "OPNFV deployment scenario"
       - string:
           name: INSTALLER_VERSION
           default: 'master'
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)