Merge "Disable fuel/mcp ci jobs on zte-pod3"
authorSerena Feng <feng.xiaowei@zte.com.cn>
Fri, 15 Sep 2017 07:17:53 +0000 (07:17 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Fri, 15 Sep 2017 07:17:53 +0000 (07:17 +0000)
14 files changed:
jjb/apex/apex-deploy.sh
jjb/apex/apex-snapshot-deploy.sh
jjb/apex/apex.yml
jjb/apex/apex.yml.j2
jjb/bottlenecks/bottlenecks-ci-jobs.yml
jjb/bottlenecks/bottlenecks-project-jobs.yml
jjb/bottlenecks/bottlenecks-run-suite.sh
jjb/compass4nfv/compass-ci-jobs.yml
jjb/fuel/fuel-daily-jobs.yml
jjb/functest/functest-alpine.sh
jjb/functest/functest-daily-jobs.yml
jjb/releng/opnfv-docker-arm.yml
jjb/releng/opnfv-docker.sh
jjb/yardstick/yardstick-cleanup.sh

index bfed67e..a79c9e7 100755 (executable)
@@ -38,7 +38,7 @@ if [[ "$ARTIFACT_VERSION" =~ dev ]]; then
   DEPLOY_SETTINGS_DIR="${WORKSPACE}/config/deploy"
   NETWORK_SETTINGS_DIR="${WORKSPACE}/config/network"
   DEPLOY_CMD="opnfv-deploy --image-dir ${WORKSPACE}/.build"
-  CLEAN_CMD="${WORKSPACE}/ci/clean.sh"
+  CLEAN_CMD="opnfv-clean"
   RESOURCES="${WORKSPACE}/.build/"
   CONFIG="${WORKSPACE}/build"
   BASE=$CONFIG
index 3eb3cf2..a93421c 100644 (file)
@@ -22,7 +22,7 @@ echo
 
 echo "Cleaning server"
 pushd ci > /dev/null
-sudo BASE=../build/ LIB=../lib ./clean.sh
+sudo opnfv-clean
 popd > /dev/null
 
 echo "Downloading latest snapshot properties file"
index c71bee1..baad8d3 100644 (file)
@@ -16,6 +16,7 @@
         - 'apex-upload-snapshot'
         - 'apex-create-snapshot'
         - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
+        - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
     # stream:    branch with - in place of / (eg. stable-arno)
     # branch:    branch (eg. stable/arno)
     stream:
                   abort-all-job: false
                   git-revision: false
 
+# Dovetail Danube test job
+- job-template:
+    name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
+
+    project-type: 'multijob'
+
+    node: 'huawei-pod4'
+
+    disabled: false
+
+    parameters:
+        - '{project}-defaults'
+        - project-parameter:
+            project: '{project}'
+            branch: 'stable/danube'
+        - apex-parameter:
+            gs-pathname: '/danube'
+        - string:
+            name: DEPLOY_SCENARIO
+            default: 'os-nosdn-nofeature-ha'
+            description: "Scenario to deploy with."
+
+    properties:
+        - logrotate-default
+        - build-blocker:
+            use-build-blocker: true
+            block-level: 'NODE'
+            blocking-jobs:
+                - 'apex-verify.*'
+                - 'apex-runner.*'
+                - 'apex-.*-promote.*'
+                - 'apex-run.*'
+
+    triggers:
+        - timed: '0 12 * * *'
+
+    builders:
+        - description-setter:
+            description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
+        - multijob:
+            name: 'Baremetal Deploy'
+            condition: SUCCESSFUL
+            projects:
+                - name: 'apex-deploy-baremetal-danube'
+                  node-parameters: true
+                  current-parameters: true
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=
+                    DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+                  git-revision: false
+        - multijob:
+            name: Dovetail
+            condition: ALWAYS
+            projects:
+                - name: 'dovetail-apex-baremetal-proposed_tests-danube'
+                  node-parameters: true
+                  current-parameters: false
+                  predefined-parameters:
+                    DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                  kill-phase-on: NEVER
+                  abort-all-job: false
+                  git-revision: false
+
 ########################
 # parameter macros
 ########################
index 356c718..df8cf92 100644 (file)
@@ -16,6 +16,7 @@
         - 'apex-upload-snapshot'
         - 'apex-create-snapshot'
         - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
+        - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
     # stream:    branch with - in place of / (eg. stable-arno)
     # branch:    branch (eg. stable/arno)
     stream:
                   abort-all-job: false
                   git-revision: false
 
+# Dovetail Danube test job
+- job-template:
+    name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
+
+    project-type: 'multijob'
+
+    node: 'huawei-pod4'
+
+    disabled: false
+
+    parameters:
+        - '{project}-defaults'
+        - project-parameter:
+            project: '{project}'
+            branch: 'stable/danube'
+        - apex-parameter:
+            gs-pathname: '/danube'
+        - string:
+            name: DEPLOY_SCENARIO
+            default: 'os-nosdn-nofeature-ha'
+            description: "Scenario to deploy with."
+
+    properties:
+        - logrotate-default
+        - build-blocker:
+            use-build-blocker: true
+            block-level: 'NODE'
+            blocking-jobs:
+                - 'apex-verify.*'
+                - 'apex-runner.*'
+                - 'apex-.*-promote.*'
+                - 'apex-run.*'
+
+    triggers:
+        - timed: '0 12 * * *'
+
+    builders:
+        - description-setter:
+            description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
+        - multijob:
+            name: 'Baremetal Deploy'
+            condition: SUCCESSFUL
+            projects:
+                - name: 'apex-deploy-baremetal-danube'
+                  node-parameters: true
+                  current-parameters: true
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=
+                    DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+                  git-revision: false
+        - multijob:
+            name: Dovetail
+            condition: ALWAYS
+            projects:
+                - name: 'dovetail-apex-baremetal-proposed_tests-danube'
+                  node-parameters: true
+                  current-parameters: false
+                  predefined-parameters:
+                    DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                  kill-phase-on: NEVER
+                  abort-all-job: false
+                  git-revision: false
+
 ########################
 # parameter macros
 ########################
index a8654d0..bb2a13c 100644 (file)
@@ -89,6 +89,7 @@
       - timeout:
           timeout: 180
           abort: true
+      - fix-workspace-permissions
 
     triggers:
       - '{auto-trigger-name}'
     builders:
       - 'bottlenecks-env-cleanup'
       - 'bottlenecks-run-suite'
+      - 'bottlenecks-workspace-cleanup'
 
     publishers:
       - email:
       - shell:
           !include-raw: ./bottlenecks-run-suite.sh
 
+- builder:
+    name: bottlenecks-workspace-cleanup
+    builders:
+        - shell: |
+            #!/bin/bash
+            set -o errexit
+            set -o nounset
+            set -o pipefail
+
+            # delete everything that is in $WORKSPACE
+            sudo rm -rf $WORKSPACE
+
 ####################
 # parameter macros
 ####################
index c7c9b42..10f73b8 100644 (file)
@@ -28,8 +28,6 @@
           disabled: false
 
     suite:
-      - 'rubbos'
-      - 'vstf'
       - 'posca_stress_traffic'
       - 'posca_stress_ping'
 
 
     builders:
       - 'bottlenecks-builder-upload-artifact'
-      - 'bottlenecks-workspace-cleanup'
+      - 'bottlenecks-artifact-workspace-cleanup'
 
 ####################
 # parameter macros
           done
 
 - builder:
-    name: bottlenecks-workspace-cleanup
+    name: bottlenecks-artifact-workspace-cleanup
     builders:
       - shell: |
           #!/bin/bash
index 6d4d2d8..811f9d5 100644 (file)
@@ -104,6 +104,9 @@ if [[ $SUITE_NAME == *posca* ]]; then
 
     deactivate
 
+    sudo rm -rf ${RELENG_REPO}/modules/venv
+    sudo rm -rf ${RELENG_REPO}/modules/opnfv.egg-info
+
     set -e
 
     cd ${WORKSPACE}
index 8b4a74b..aaa5b57 100644 (file)
         # here the stream means the SUT stream, dovetail stream is defined in its own job
         # only run on os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha scenario
         # run against SUT master branch, dovetail docker image with latest tag
-        # run against SUT danube branch, dovetail docker image with latest tag(odd days)and cvp.X.X.X tag(even days)
+        # run against SUT danube branch, dovetail docker image with latest tag(Monday and Sunday)
+        # run against SUT danube branch, dovetail docker image with cvp.X.X.X tag(Tuesday, Thursday, Friday and Saturday)
         - conditional-step:
             condition-kind: and
             condition-operands:
                   regex: danube
                   label: '{stream}'
                 - condition-kind: regex-match
-                  regex: os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha
+                  regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha
                   label: '{scenario}'
                 - condition-kind: day-of-week
                   day-selector: select-days
                   days:
                       MON: true
-                      WED: true
-                      FRI: true
                       SUN: true
                   use-build-time: true
             steps:
                   regex: danube
                   label: '{stream}'
                 - condition-kind: regex-match
-                  regex: os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha
+                  regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha
                   label: '{scenario}'
                 - condition-kind: day-of-week
                   day-selector: select-days
                   days:
                       TUES: true
+                      WED: true
                       THURS: true
+                      FRI: true
                       SAT: true
                   use-build-time: true
             steps:
             condition-kind: and
             condition-operands:
                 - condition-kind: regex-match
-                  regex: os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha
+                  regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha
                   label: '{scenario}'
                 - condition-kind: regex-match
                   regex: master
 - trigger:
     name: 'compass-k8-nosdn-nofeature-ha-virtual-master-trigger'
     triggers:
-        - timed: ''
+        - timed: '0 12 * * *'
 - trigger:
     name: 'compass-os-odl-sfc-ha-virtual-master-trigger'
     triggers:
index f3571ed..4bdfa5b 100644 (file)
             auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger'
         - 'os-nosdn-kvm_ovs_dpdk_bar-noha':
             auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger'
+        # danube scenario for Dovetail only
+        - 'os-odl_l2-bgpvpn-ha':
+            auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger'
+
+    exclude:
+        - scenario: os-odl_l2-bgpvpn-ha
+          stream: master
+        - scenario: os-odl_l2-bgpvpn-ha
+          stream: euphrates
 
     jobs:
         - 'fuel-{scenario}-{pod}-daily-{stream}'
         # 6.ZTE pod1, os-nosdn-nofeature-ha and os-odl-bgpvpn-ha, run against danube
         - conditional-step:
             condition-kind: regex-match
-            regex: os-(nosdn-nofeature|odl-bgpvpn)-ha
+            regex: os-(nosdn-nofeature|odl_l2-bgpvpn)-ha
             label: '{scenario}'
             steps:
                 - trigger-builds:
     name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-danube-trigger'
     triggers:
         - timed: '0 2 * * 6'
+- trigger:
+    name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod1-daily-danube-trigger'
+    triggers:
+        - timed: '0 2 * * 1,3,5'
 - trigger:
     name: 'fuel-os-odl-nofeature-ha-zte-pod1-daily-danube-trigger'
     triggers:
index 34c746e..d15b985 100755 (executable)
@@ -6,16 +6,20 @@ set +o pipefail
 
 [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
 FUNCTEST_DIR=/home/opnfv/functest
+DEPLOY_TYPE=baremetal
+[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt
+HOST_ARCH=$(uname -m)
 
 # Prepare OpenStack credentials volume
+rc_file=${HOME}/opnfv-openrc.sh
+
 if [[ ${INSTALLER_TYPE} == 'joid' ]]; then
     rc_file=$LAB_CONFIG/admin-openrc
 elif [[ ${INSTALLER_TYPE} == 'compass' && ${BRANCH} == 'master' ]]; then
     cacert_file_vol="-v ${HOME}/os_cacert:${FUNCTEST_DIR}/conf/os_cacert"
     echo "export OS_CACERT=${FUNCTEST_DIR}/conf/os_cacert" >> ${HOME}/opnfv-openrc.sh
-    rc_file=${HOME}/opnfv-openrc.sh
-else
-    rc_file=${HOME}/opnfv-openrc.sh
+elif [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then
+    cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert"
 fi
 rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/openstack.creds"
 
@@ -25,10 +29,6 @@ if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FOR
     sudo iptables -I FORWARD -j RETURN
 fi
 
-DEPLOY_TYPE=baremetal
-[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt
-HOST_ARCH=$(uname -m)
-
 echo "Functest: Start Docker and prepare environment"
 
 echo "Functest: Download images that will be used by test cases"
@@ -80,7 +80,7 @@ for tier in ${tiers[@]}; do
     FUNCTEST_IMAGE=opnfv/functest-${tier}
     echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..."
     docker pull ${FUNCTEST_IMAGE}>/dev/null
-    cmd="docker run ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
+    cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
     echo "Running Functest tier '${tier}'. CMD: ${cmd}"
     eval ${cmd}
 done
index cbf1755..23c6e49 100644 (file)
     name: functest-daily-builder
     builders:
         - 'functest-cleanup'
-        - 'set-functest-env-alpine'
         - 'functest-daily'
         - 'functest-store-results'
 
     name: functest-daily
     builders:
         - shell:
-            !include-raw: ./functest-alpine.sh
+            !include-raw:
+                - ./functest-env-presetup.sh
+                - ../../utils/fetch_os_creds.sh
+                - ./functest-alpine.sh
 
 - builder:
     name: functest-arm-daily
index ec1d743..21d5698 100644 (file)
@@ -39,6 +39,7 @@
 
     dockerfile: "Dockerfile.aarch64"
     dockerdir: "docker"
+    docker_repo_name: "opnfv/{project}_aarch64"
     arch_tag: ""
 
     dockerrepo:
             description: "To enable/disable pushing the image to Dockerhub."
         - string:
             name: DOCKER_REPO_NAME
-            default: "opnfv/{project}_aarch64"
+            default: "{docker_repo_name}"
             description: "Dockerhub repo to be pushed to."
         - string:
             name: RELEASE_VERSION
             description: "Release version, e.g. 1.0, 2.0, 3.0"
         - string:
             name: DOCKER_DIR
-            default: "docker"
+            default: "{dockerdir}"
             description: "Directory containing files needed by the Dockerfile"
         - string:
             name: DOCKERFILE
index 6ca8e37..b03505e 100644 (file)
@@ -90,6 +90,7 @@ if [[ -n "${COMMIT_ID-}" && -n "${RELEASE_VERSION-}" ]]; then
 fi
 
 ARCH_BUILD_ARG=""
+ARCH_TAG=${ARCH_TAG:-}
 if [[ -n "${ARCH_TAG}" ]]; then
     DOCKER_TAG=${ARCH_TAG}-${DOCKER_TAG}
     ARCH_BUILD_ARG="--build-arg ARCH=${ARCH_TAG}"
index 51455b5..47bf9bd 100755 (executable)
@@ -1,36 +1,36 @@
 #!/bin/bash
-[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
+[[ ${CI_DEBUG} == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
 
 # Remove containers along with image opnfv/yardstick*:<none>
-dangling_images=($(docker images -f "dangling=true" | grep opnfv/yardstick | awk '{print $3}'))
-if [[ -n ${dangling_images} ]]; then
+dangling_images=($(docker images -f "dangling=true" | awk '/opnfv[/]yardstick/ {print $3}'))
+if [[ ${#dangling_images[@]} -eq 0 ]] ; then
     echo "Removing opnfv/yardstick:<none> images and their containers..."
     for image_id in "${dangling_images[@]}"; do
         echo "      Removing image_id: $image_id and its containers"
-        containers=$(docker ps -a | grep $image_id | awk '{print $1}')
+        containers=$(docker ps -a | awk "/${image_id}/ {print \$1}")
         if [[ -n "$containers" ]];then
-            docker rm -f $containers >${redirect}
+            docker rm -f "${containers}" >${redirect}
         fi
-        docker rmi $image_id >${redirect}
+        docker rmi "${image_id}" >${redirect}
     done
 fi
 
 echo "Cleaning up docker containers/images..."
 # Remove previous running containers if exist
-if [[ ! -z $(docker ps -a | grep opnfv/yardstick) ]]; then
+if docker ps -a | grep -q opnfv/yardstick; then
     echo "Removing existing opnfv/yardstick containers..."
-    docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm -f >$redirect
+    docker ps -a | awk "/${image_id}/ {print \$1}" | xargs docker rm -f >${redirect}
 
 fi
 
 # Remove existing images if exist
-if [[ ! -z $(docker images | grep opnfv/yardstick) ]]; then
+if docker images | grep -q opnfv/yardstick; then
     echo "Docker images to remove:"
     docker images | head -1 && docker images | grep opnfv/yardstick
-    image_tags=($(docker images | grep opnfv/yardstick | awk '{print $2}'))
-    for tag in "${image_tags[@]}"; do
-        echo "Removing docker image opnfv/yardstick:$tag..."
-        docker rmi opnfv/yardstick:$tag >$redirect
+    image_ids=($(docker images | awk '/opnfv[/]yardstick/ {print $3}'))
+    for id in "${image_ids[@]}"; do
+        echo "Removing docker image id $id..."
+        docker rmi "${id}" >${redirect}
     done
 fi