Merge "Stop maintaining Euphrates (EOL)"
authorFatih Degirmenci <fdegir@gmail.com>
Thu, 12 Apr 2018 09:42:29 +0000 (09:42 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 12 Apr 2018 09:42:29 +0000 (09:42 +0000)
jjb/apex/apex.yml
jjb/apex/apex.yml.j2
jjb/releng/opnfv-docker.yml
jjb/xci/bifrost-verify.sh
jjb/xci/xci-run-functest.sh
jjb/xci/xci-set-scenario.sh

index 2380932..8497203 100644 (file)
       - multijob:
           name: apex-fetch-logs
           projects:
-            - name: 'apex-fetch-logs'
+            - name: 'apex-fetch-logs-{scenario_stream}'
               current-parameters: true
               predefined-parameters: |
                 GERRIT_BRANCH=$GERRIT_BRANCH
index 5965efe..dac7c3a 100644 (file)
       - multijob:
           name: apex-fetch-logs
           projects:
-            - name: 'apex-fetch-logs'
+            - name: 'apex-fetch-logs-{scenario_stream}'
               current-parameters: true
               predefined-parameters: |
                 GERRIT_BRANCH=$GERRIT_BRANCH
index 52b1c79..0fe76f0 100644 (file)
       - 'clover-ns-nginx-lb':
           project: 'clover'
           dockerdir: 'samples/services/nginx/docker'
-          dockerfile: 'samples/services/nginx/docker/subservices/lb/Dockerfile'
+          dockerfile: 'subservices/lb/Dockerfile'
           <<: *master
           <<: *other-receivers
       - 'clover-ns-nginx-proxy':
           project: 'clover'
           dockerdir: 'samples/services/nginx/docker'
-          dockerfile: 'samples/services/nginx/docker/subservices/proxy/Dockerfile'
+          dockerfile: 'subservices/proxy/Dockerfile'
           <<: *master
           <<: *other-receivers
       - 'clover-ns-nginx-server':
           project: 'clover'
           dockerdir: 'samples/services/nginx/docker'
-          dockerfile: 'samples/services/nginx/docker/subservices/server/Dockerfile'
+          dockerfile: 'subservices/server/Dockerfile'
           <<: *master
           <<: *other-receivers
       - 'clover-ns-snort-ids':
           project: 'clover'
           dockerdir: 'samples/services/snort_ids/docker'
-          dockerfile: 'samples/services/snort_ids/docker/Dockerfile'
+          dockerfile: 'Dockerfile'
           <<: *master
           <<: *other-receivers
       - 'cperf':
       - 'clover-ns-nginx-lb':
           project: 'clover'
           dockerdir: 'samples/services/nginx/docker'
-          dockerfile: 'samples/services/nginx/docker/subservices/lb/Dockerfile'
+          dockerfile: 'subservices/lb/Dockerfile'
           <<: *fraser
           <<: *other-receivers
       - 'clover-ns-nginx-proxy':
           project: 'clover'
           dockerdir: 'samples/services/nginx/docker'
-          dockerfile: 'samples/services/nginx/docker/subservices/proxy/Dockerfile'
+          dockerfile: 'subservices/proxy/Dockerfile'
           <<: *fraser
           <<: *other-receivers
       - 'clover-ns-nginx-server':
           project: 'clover'
           dockerdir: 'samples/services/nginx/docker'
-          dockerfile: 'samples/services/nginx/docker/subservices/server/Dockerfile'
+          dockerfile: 'subservices/server/Dockerfile'
           <<: *fraser
           <<: *other-receivers
       - 'clover-ns-snort-ids':
           project: 'clover'
           dockerdir: 'samples/services/snort_ids/docker'
-          dockerfile: 'samples/services/snort_ids/docker/Dockerfile'
+          dockerfile: 'Dockerfile'
           <<: *fraser
           <<: *other-receivers
     # yamllint enable rule:key-duplicates
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..3ae6a8d 100755 (executable)
@@ -52,8 +52,22 @@ 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)