Merge "bug-fix: delete directory created by root for workspace cleanup"
authorJun Li <lijun_1203@126.com>
Fri, 15 Sep 2017 02:13:55 +0000 (02:13 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Fri, 15 Sep 2017 02:13:55 +0000 (02:13 +0000)
jjb/apex/apex-deploy.sh
jjb/apex/apex-snapshot-deploy.sh
jjb/apex/apex.yml
jjb/apex/apex.yml.j2
jjb/compass4nfv/compass-ci-jobs.yml
jjb/fuel/fuel-daily-jobs.yml
jjb/functest/functest-alpine.sh
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 2284238..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:
index 0ec81c0..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:
index 8b4a74b..5857779 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
index deadefb..c8c3746 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..33a64a4 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"
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