Merge "A new docker container for QTIP"
authorFatih Degirmenci <fdegir@gmail.com>
Fri, 9 Mar 2018 19:47:41 +0000 (19:47 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Fri, 9 Mar 2018 19:47:42 +0000 (19:47 +0000)
36 files changed:
jjb/armband/armband-ci-jobs.yml
jjb/compass4nfv/compass-ci-jobs.yml
jjb/container4nfv/arm64/compass-deploy.sh
jjb/container4nfv/container4nfv-arm64.yml
jjb/daisy4nfv/daisy-daily-jobs.yml
jjb/dovetail/dovetail-run.sh
jjb/fuel/fuel-daily-jobs.yml
jjb/functest/functest-alpine.sh
jjb/functest/functest-daily-jobs.yml
jjb/functest/functest-k8.sh
jjb/functest/functest-kubernetes-project-jobs.yml [new file with mode: 0644]
jjb/functest/xtesting-project-jobs.yml [new file with mode: 0644]
jjb/global/installer-report.sh
jjb/global/releng-macros.yml
jjb/pharos/check-jinja2.yml
jjb/qtip/qtip-experimental-jobs.yml
jjb/qtip/qtip-validate-jobs.yml
jjb/releng/compass4nfv-docker.yml
jjb/releng/functest-docker.yml
jjb/releng/opnfv-docker.sh
jjb/releng/opnfv-docker.yml
jjb/releng/testresults-automate.yml [moved from jjb/releng/automate.yml with 73% similarity]
jjb/releng/testresults-verify.yml [new file with mode: 0644]
jjb/xci/bifrost-verify.sh
jjb/xci/osa-periodic-jobs.yml
jjb/xci/xci-cleanup.sh
jjb/xci/xci-run-functest.sh
jjb/xci/xci-set-scenario.sh [new file with mode: 0755]
jjb/xci/xci-start-deployment.sh
jjb/xci/xci-start-new-vm.sh
jjb/xci/xci-verify-jobs.yml
jjb/yardstick/yardstick-daily-jobs.yml
jjb/yardstick/yardstick-daily.sh
jjb/yardstick/yardstick-project-jobs.yml
utils/fetch_k8_conf.sh
utils/jenkins-jnlp-connect.sh

index da3992e..ada4306 100644 (file)
           auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
       - 'os-odl-nofeature-ha':
           auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
+      - 'os-ovn-nofeature-ha':
+          auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
+      - 'os-nosdn-ovs-ha':
+          auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
 
       # NOHA scenarios
       - 'os-nosdn-nofeature-noha':
           auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
 
+    exclude:
+      - scenario: os-ovn-nofeature-ha
+        stream: euphrates
+
     jobs:
       - '{installer}-{scenario}-{pod}-daily-{stream}'
       - '{installer}-deploy-{pod}-daily-{stream}'
               DEPLOY_SCENARIO={scenario}
             same-node: true
             block: true
+      - trigger-builds:
+          - project: 'functest-{installer}-{pod}-daily-{stream}'
+            current-parameters: false
+            predefined-parameters:
+              DEPLOY_SCENARIO={scenario}
+            same-node: true
+            block: true
+            block-thresholds:
+              build-step-failure-threshold: 'never'
+              failure-threshold: 'never'
+              unstable-threshold: 'FAILURE'
+      - trigger-builds:
+          - project: 'yardstick-{installer}-{pod}-daily-{stream}'
+            current-parameters: false
+            predefined-parameters:
+              DEPLOY_SCENARIO={scenario}
+            block: true
+            same-node: true
+            block-thresholds:
+              build-step-failure-threshold: 'never'
+              failure-threshold: 'never'
+              unstable-threshold: 'FAILURE'
+      # 1.here the stream means the SUT stream, dovetail stream is defined in its own job
+      # 2.testsuite proposed_tests here is for new test cases planning to add into OVP
+      # 3.run proposed_tests on Monday, Wednesday and Friday against ha scenario
+      # 4.testsuite default here is for the test cases already added into OVP
+      # 5.run default testsuite on Tuesday against ha scenario
+      # 6.not used for release criteria or compliance,
+      #   only to debug the dovetail tool bugs with arm pods
       - conditional-step:
-          condition-kind: not
-          condition-operand:
-            condition-kind: regex-match
-            regex: 'danube'
-            label: '{stream}'
+          condition-kind: and
+          condition-operands:
+            - condition-kind: regex-match
+              regex: '.*-ha'
+              label: '{scenario}'
+            - condition-kind: day-of-week
+              day-selector: select-days
+              days:
+                MON: true
+                WED: true
+                FRI: true
+              use-build-time: true
           steps:
             - trigger-builds:
-                - project: 'functest-{installer}-{pod}-arm-daily-{stream}'
+                - project: 'dovetail-{installer}-{pod}-proposed_tests-{stream}'
                   current-parameters: false
                   predefined-parameters:
                     DEPLOY_SCENARIO={scenario}
                     failure-threshold: 'never'
                     unstable-threshold: 'FAILURE'
       - conditional-step:
-          condition-kind: not
-          condition-operand:
-            condition-kind: regex-match
-            regex: 'danube'
-            label: '{stream}'
+          condition-kind: and
+          condition-operands:
+            - condition-kind: regex-match
+              regex: '.*-ha'
+              label: '{scenario}'
+            - condition-kind: day-of-week
+              day-selector: select-days
+              days:
+                TUES: true
+              use-build-time: true
           steps:
             - trigger-builds:
-                - project: 'yardstick-{installer}-{pod}-daily-{stream}'
+                - project: 'dovetail-{installer}-{pod}-default-{stream}'
                   current-parameters: false
                   predefined-parameters:
                     DEPLOY_SCENARIO={scenario}
                     build-step-failure-threshold: 'never'
                     failure-threshold: 'never'
                     unstable-threshold: 'FAILURE'
-      # 1.here the stream means the SUT stream, dovetail stream is defined in its own job
-      # 2.only debug testsuite here(refstack, ha, vping, ipv6, tempest, bgpvpn)
-      # 3.not used for release criteria or compliance,
-      #   only to debug the dovetail tool bugs with arm pods
-      - trigger-builds:
-          - project: 'dovetail-{installer}-{pod}-proposed_tests-{stream}'
-            current-parameters: false
-            predefined-parameters:
-              DEPLOY_SCENARIO={scenario}
-            block: true
-            same-node: true
-            block-thresholds:
-              build-step-failure-threshold: 'never'
-              failure-threshold: 'never'
-              unstable-threshold: 'FAILURE'
       # Armband uses Fuel's log collection project job, no need to duplicate
       - conditional-step:
           condition-kind: not
 - trigger:
     name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger'
     triggers:
-      - timed: '0 1 * * 2,4,6'
+      - timed: '0 1 * * 4,6'
 - trigger:
     name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-master-trigger'
     triggers:
 - trigger:
     name: 'fuel-os-odl-nofeature-ha-armband-baremetal-master-trigger'
     triggers:
-      - timed: '0 1 * * 1,3,5,7'
+      - timed: '0 1 * * 2,5,7'
+- trigger:
+    name: 'fuel-os-ovn-nofeature-ha-armband-baremetal-master-trigger'
+    triggers:
+      - timed: ''
+- trigger:
+    name: 'fuel-os-nosdn-ovs-ha-armband-baremetal-master-trigger'
+    triggers:
+      - timed: '0 1 * * 1,3'
 # ---------------------------------------------------------------------
 # Enea Armband CI Baremetal Triggers running against euphrates branch
 # ---------------------------------------------------------------------
     name: 'fuel-os-odl-nofeature-ha-armband-baremetal-euphrates-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'fuel-os-nosdn-ovs-ha-armband-baremetal-euphrates-trigger'
+    triggers:
+      - timed: ''
+
 # --------------------------------------------------------------
 # Enea Armband CI Virtual Triggers running against master branch
 # --------------------------------------------------------------
     name: 'fuel-os-odl-nofeature-ha-armband-virtual-master-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'fuel-os-ovn-nofeature-ha-armband-virtual-master-trigger'
+    triggers:
+      - timed: ''
+- trigger:
+    name: 'fuel-os-nosdn-ovs-ha-armband-virtual-master-trigger'
+    triggers:
+      - timed: ''
 # -------------------------------------------------------------------
 # Enea Armband CI Virtual Triggers running against euphrates branch
 # -------------------------------------------------------------------
     name: 'fuel-os-odl-nofeature-ha-armband-virtual-euphrates-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'fuel-os-nosdn-ovs-ha-armband-virtual-euphrates-trigger'
+    triggers:
+      - timed: ''
index 81d76d5..357f24e 100644 (file)
       - 'os-nosdn-bar-ha':
           disabled: false
           auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+      - 'os-nosdn-bar-noha':
+          disabled: false
+          auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+      - 'k8-nosdn-stor4nfv-ha':
+          disabled: false
+          auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+      - 'k8-nosdn-stor4nfv-noha':
+          disabled: false
+          auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
 
     jobs:
       - 'compass-{scenario}-{pod}-daily-{stream}'
           installer: '{installer}'
           gs-pathname: '{gs-pathname}'
           ppa-pathname: '{ppa-pathname}'
-      - string:
-          name: DEPLOY_SCENARIO
-          default: '{scenario}'
+          scenario: '{scenario}'
       - '{slave-label}-defaults'
       - '{installer}-defaults'
 
           installer: '{installer}'
           gs-pathname: '{gs-pathname}'
           ppa-pathname: '{ppa-pathname}'
+          scenario: '{scenario}'
       - '{slave-label}-defaults'
       - '{installer}-defaults'
 
           installer: '{installer}'
           gs-pathname: '{gs-pathname}'
           ppa-pathname: '{ppa-pathname}'
+          scenario: '{scenario}'
       - '{slave-label}-defaults'
       - '{installer}-defaults'
 
           name: LOG_DIRECTORY
           default: $WORKSPACE/log_output
           description: "Directory where the logs will be located upon the completion of the collection."
+      - string:
+          name: DEPLOY_SCENARIO
+          default: '{scenario}'
+          description: "Scenario to deploy with."
+      - string:
+          name: COMPASS_OS_VERSION
+          default: ''
+      - string:
+          name: COMPASS_OPENSTACK_VERSION
+          default: ''
+
 
 ########################
 # trigger macros
 - trigger:
     name: 'compass-k8-nosdn-nofeature-ha-baremetal-centos-master-trigger'
     triggers:
-      - timed: ''
+      - timed: '0 6 * * *'
 - trigger:
     name: 'compass-os-nosdn-bar-ha-baremetal-centos-master-trigger'
     triggers:
       - timed: ''  # '0 19 * * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-ha-baremetal-centos-master-trigger'
+    triggers:
+      - timed: ''
 
 # ----------------------------
 # noha-baremetal-centos-master
     name: 'compass-os-nosdn-ovs_dpdk-noha-baremetal-centos-master-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'compass-os-nosdn-bar-noha-baremetal-centos-master-trigger'
+    triggers:
+      - timed: ''  # '0 19 * * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-noha-baremetal-centos-master-trigger'
+    triggers:
+      - timed: ''
+
 
 # --------------------------
 # ha-huawei-pod7-danube
     name: 'compass-os-nosdn-bar-ha-huawei-pod7-danube-trigger'
     triggers:
       - timed: ''  # '0 19 * * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-ha-huawei-pod7-danube-trigger'
+    triggers:
+      - timed: ''
 
 # ----------------------------
 # noha-huawei-pod7-danube
     name: 'compass-os-nosdn-ovs_dpdk-noha-huawei-pod7-danube-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'compass-os-nosdn-bar-noha-huawei-pod7-danube-trigger'
+    triggers:
+      - timed: ''  # '0 19 * * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-noha-huawei-pod7-danube-trigger'
+    triggers:
+      - timed: ''
 
 # -------------------
 # ha-baremetal-master
 - trigger:
     name: 'compass-k8-nosdn-nofeature-ha-baremetal-master-trigger'
     triggers:
-      - timed: ''
+      - timed: '0 10 2-30/2 * *'
 - trigger:
     name: 'compass-os-odl-sfc-ha-baremetal-master-trigger'
     triggers:
     name: 'compass-os-nosdn-bar-ha-baremetal-master-trigger'
     triggers:
       - timed: '0 2 2-30/2 * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-ha-baremetal-master-trigger'
+    triggers:
+      - timed: '0 16 1-29/2 * *'
 
 # ---------------------
 # noha-baremetal-master
     name: 'compass-os-nosdn-ovs_dpdk-noha-baremetal-master-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'compass-os-nosdn-bar-noha-baremetal-master-trigger'
+    triggers:
+      - timed: ''
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-noha-baremetal-master-trigger'
+    triggers:
+      - timed: ''
 
 # -------------------
 # ha-baremetal-euphrates
     name: 'compass-os-nosdn-bar-ha-baremetal-euphrates-trigger'
     triggers:
       - timed: '0 21 1-29/2 * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-ha-baremetal-euphrates-trigger'
+    triggers:
+      - timed: ''
 
 # ---------------------
 # noha-baremetal-euphrates
     name: 'compass-os-nosdn-ovs_dpdk-noha-baremetal-euphrates-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'compass-os-nosdn-bar-noha-baremetal-euphrates-trigger'
+    triggers:
+      - timed: ''
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-noha-baremetal-euphrates-trigger'
+    triggers:
+      - timed: ''
 
 # -----------------
 # ha-virtual-master
     name: 'compass-os-nosdn-bar-ha-virtual-master-trigger'
     triggers:
       - timed: '0 17 1-29/2 * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-ha-virtual-master-trigger'
+    triggers:
+      - timed: '0 15 2-30/2 * *'
 
 # -------------------
 # noha-virtual-master
     name: 'compass-os-nosdn-ovs_dpdk-noha-virtual-master-trigger'
     triggers:
       - timed: '0 11 2-30/2 * *'
+- trigger:
+    name: 'compass-os-nosdn-bar-noha-virtual-master-trigger'
+    triggers:
+      - timed: '0 22 1-29/2 * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-noha-virtual-master-trigger'
+    triggers:
+      - timed: '0 10 2-30/2 * *'
 
 # -----------------
 # ha-virtual-euphrates
     name: 'compass-os-nosdn-bar-ha-virtual-euphrates-trigger'
     triggers:
       - timed: '0 19 1-29/2 * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-ha-virtual-euphrates-trigger'
+    triggers:
+      - timed: ''  # '0 14 1-29/2 * *'
 
 # -------------------
 # noha-virtual-euphrates
     name: 'compass-os-nosdn-ovs_dpdk-noha-virtual-euphrates-trigger'
     triggers:
       - timed: '0 12 2-30/2 * *'
+- trigger:
+    name: 'compass-os-nosdn-bar-noha-virtual-euphrates-trigger'
+    triggers:
+      - timed: '0 12 1-29/2 * *'
+- trigger:
+    name: 'compass-k8-nosdn-stor4nfv-noha-virtual-euphrates-trigger'
+    triggers:
+      - timed: ''  # '0 12 2-30/2 * *'
index bbbf3f4..a22af09 100755 (executable)
@@ -5,9 +5,14 @@ cd compass4nfv
 
 export ADAPTER_OS_PATTERN='(?i)CentOS-7.*arm.*'
 export OS_VERSION="centos7"
-export KUBERNETES_VERSION="v1.7.3"
-export DHA="deploy/conf/vm_environment/k8-nosdn-nofeature-noha.yml"
-export NETWORK="deploy/conf/vm_environment/network.yml"
-export VIRT_NUMBER=2 VIRT_CPUS=4 VIRT_MEM=8192 VIRT_DISK=50G
+export KUBERNETES_VERSION="v1.7.5"
+if [[ "$NODE_NAME" =~ "-virtual" ]]; then
+    export DHA="deploy/conf/vm_environment/k8-nosdn-nofeature-noha.yml"
+    export NETWORK="deploy/conf/vm_environment/network.yml"
+    export VIRT_NUMBER=2 VIRT_CPUS=4 VIRT_MEM=8192 VIRT_DISK=50G
+else
+    export DHA="deploy/conf/hardware_environment/huawei-pod8/k8-nosdn-nofeature-noha.yml"
+    export NETWORK="deploy/conf/hardware_environment/huawei-pod8/network.yml"
+fi
 
 ./deploy.sh
index b69c214..3246243 100644 (file)
@@ -9,15 +9,20 @@
           disabled: false
       - 'k8-sriov-nofeature-noha':
           disabled: false
+    pod:
+      - virtual:
+          slave-label: arm-packet01
+      - baremetal:
+          slave-label: compass-baremetal-arm
     jobs:
-      - 'container4nfv-{scenario}-virtual-daily-master'
+      - 'container4nfv-{scenario}-{pod}-daily-master'
 
 
 - job-template:
-    name: 'container4nfv-{scenario}-virtual-daily-master'
+    name: 'container4nfv-{scenario}-{pod}-daily-master'
     disabled: '{obj:disabled}'
     concurrent: false
-    node: arm-packet01
+    node: '{slave-label}'
 
     scm:
       - git:
@@ -28,7 +33,7 @@
           wipe-workspace: true
 
     triggers:
-      - 'trigger-{scenario}-virtual'
+      - 'trigger-{scenario}-{pod}'
 
     wrappers:
       - timeout:
@@ -46,6 +51,7 @@
             same-node: true
             block: false
 
+
 - trigger:
     name: 'trigger-k8-multus-nofeature-noha-virtual'
     triggers:
     name: 'trigger-k8-sriov-nofeature-noha-virtual'
     triggers:
       - timed: '0 16 * * *'
+
+- trigger:
+    name: 'trigger-k8-multus-nofeature-noha-baremetal'
+    triggers:
+      - timed: '0 16 * * *'
+- trigger:
+    name: 'trigger-k8-sriov-nofeature-noha-baremetal'
+    triggers:
+      - timed: '0 20 * * *'
index fbbb086..c354ca6 100644 (file)
       - string:
           name: DEPLOY_SCENARIO
           default: '{scenario}'
+      - string:
+          name: INSTALLER_VERSION
+          default: ''
+      - string:
+          name: UPSTREAM_JOB_NAME
+          default: ''
+      - string:
+          name: UPSTREAM_BUILD_ID
+          default: ''
       - 'daisy-project-parameter':
           gs-pathname: '{gs-pathname}'
 
index 451662a..ec879e3 100755 (executable)
@@ -199,6 +199,27 @@ if [[ ! -f ${cirros_image} ]]; then
 fi
 sudo cp ${cirros_image} ${DOVETAIL_CONFIG}
 
+# snaps_smoke test case needs to download this image first before running
+ubuntu14_image=${image_path}/ubuntu-14.04-server-cloudimg-amd64-disk1.img
+if [[ ! -f ${ubuntu14_image} ]]; then
+    echo "Download image ubuntu-14.04-server-cloudimg-amd64-disk1.img ..."
+    wget -q -nc https://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img -P ${image_path}
+fi
+sudo cp ${ubuntu14_image} ${DOVETAIL_CONFIG}
+
+# cloudify_ims test case needs to download these 2 images first before running
+cloudify_image=${image_path}/cloudify-manager-premium-4.0.1.qcow2
+if [[ ! -f ${cloudify_image} ]]; then
+    echo "Download image cloudify-manager-premium-4.0.1.qcow2 ..."
+    wget -q -nc http://repository.cloudifysource.org/cloudify/4.0.1/sp-release/cloudify-manager-premium-4.0.1.qcow2 -P ${image_path}
+fi
+sudo cp ${cloudify_image} ${DOVETAIL_CONFIG}
+trusty_image=${image_path}/trusty-server-cloudimg-amd64-disk1.img
+if [[ ! -f ${trusty_image} ]]; then
+    echo "Download image trusty-server-cloudimg-amd64-disk1.img ..."
+    wget -q -nc http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -P ${image_path}
+fi
+sudo cp ${trusty_image} ${DOVETAIL_CONFIG}
 
 opts="--privileged=true -id"
 
@@ -238,18 +259,6 @@ if [ $(docker ps | grep "${DOCKER_REPO}:${DOCKER_TAG}" | wc -l) == 0 ]; then
     exit 1
 fi
 
-if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then
-    source_cmd="source ${OPENRC}"
-    get_public_url_cmd="openstack --insecure endpoint list --service keystone --interface public | sed -n 4p | awk '{print \$14}'"
-    public_url=$(sudo docker exec "$container_id" /bin/bash -c "${source_cmd} && ${get_public_url_cmd}")
-    sed -i 's#OS_AUTH_URL=.*#OS_AUTH_URL='"${public_url}"'#g' ${OPENRC}
-    sed -i 's/internal/public/g' ${OPENRC}
-    if [[ ${public_url} =~ 'v2' ]]; then
-        sed -i "s/OS_IDENTITY_API_VERSION=3/OS_IDENTITY_API_VERSION=2.0/g" ${OPENRC}
-    fi
-    cat ${OPENRC}
-fi
-
 # Modify tempest_conf.yaml file
 tempest_conf_file=${DOVETAIL_CONFIG}/tempest_conf.yaml
 if [[ ${INSTALLER_TYPE} == 'compass' || ${INSTALLER_TYPE} == 'apex' ]]; then
index bbc8a84..a198751 100644 (file)
@@ -63,6 +63,8 @@
           auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger'
       - 'os-onos-nofeature-ha':
           auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger'
+      - 'os-ovn-nofeature-ha':
+          auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger'
       - 'os-nosdn-kvm-ha':
           auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger'
       - 'os-nosdn-ovs-ha':
         stream: master
       - scenario: os-odl_l2-bgpvpn-ha
         stream: euphrates
+      - scenario: os-ovn-nofeature-noha
+        stream: danube
+      - scenario: os-ovn-nofeature-noha
+        stream: euphrates
+      - scenario: os-ovn-nofeature-ha
+        stream: danube
+      - scenario: os-ovn-nofeature-ha
+        stream: euphrates
 
     jobs:
       - 'fuel-{scenario}-{pod}-daily-{stream}'
               DEPLOY_SCENARIO={scenario}
             same-node: true
             block: true
+      - trigger-builds:
+          - project: 'functest-fuel-{pod}-daily-{stream}'
+            current-parameters: false
+            predefined-parameters:
+              DEPLOY_SCENARIO={scenario}
+            same-node: true
+            block: true
+            block-thresholds:
+              build-step-failure-threshold: 'never'
+              failure-threshold: 'never'
+              unstable-threshold: 'FAILURE'
+      - trigger-builds:
+          - project: 'yardstick-fuel-{pod}-daily-{stream}'
+            current-parameters: false
+            predefined-parameters:
+              DEPLOY_SCENARIO={scenario}
+            block: true
+            same-node: true
+            block-thresholds:
+              build-step-failure-threshold: 'never'
+              failure-threshold: 'never'
+              unstable-threshold: 'FAILURE'
+      # 1.here the stream means the SUT stream, dovetail stream is defined in its own job
+      # 2.testsuite proposed_tests here is for new test cases planning to add into OVP
+      # 3.run proposed_tests on Monday, Wednesday and Friday against ha scenario
+      # 4.testsuite default here is for the test cases already added into OVP
+      # 5.run default testsuite on Tuesday against ha scenario
+      # 6.not used for release criteria or compliance, only to debug the dovetail tool bugs
       - conditional-step:
-          condition-kind: not
-          condition-operand:
-            condition-kind: regex-match
-            regex: 'danube'
-            label: '{stream}'
+          condition-kind: and
+          condition-operands:
+            - condition-kind: regex-match
+              regex: '.*-ha'
+              label: '{scenario}'
+            - condition-kind: day-of-week
+              day-selector: select-days
+              days:
+                MON: true
+                WED: true
+                FRI: true
+              use-build-time: true
           steps:
             - trigger-builds:
-                - project: 'functest-fuel-{pod}-daily-{stream}'
+                - project: 'dovetail-fuel-{pod}-proposed_tests-{stream}'
                   current-parameters: false
                   predefined-parameters:
                     DEPLOY_SCENARIO={scenario}
-                  same-node: true
                   block: true
+                  same-node: true
                   block-thresholds:
                     build-step-failure-threshold: 'never'
                     failure-threshold: 'never'
                     unstable-threshold: 'FAILURE'
       - conditional-step:
-          condition-kind: not
-          condition-operand:
-            condition-kind: regex-match
-            regex: 'danube'
-            label: '{stream}'
+          condition-kind: and
+          condition-operands:
+            - condition-kind: regex-match
+              regex: '.*-ha'
+              label: '{scenario}'
+            - condition-kind: day-of-week
+              day-selector: select-days
+              days:
+                TUES: true
+              use-build-time: true
           steps:
             - trigger-builds:
-                - project: 'yardstick-fuel-{pod}-daily-{stream}'
+                - project: 'dovetail-fuel-{pod}-default-{stream}'
                   current-parameters: false
                   predefined-parameters:
                     DEPLOY_SCENARIO={scenario}
                     build-step-failure-threshold: 'never'
                     failure-threshold: 'never'
                     unstable-threshold: 'FAILURE'
-      # 1.here the stream means the SUT stream, dovetail stream is defined in its own job
-      # 2.only debug testsuite here(refstack, ha, vping, ipv6, tempest, bgpvpn)
-      # 3.not used for release criteria or compliance, only to debug the dovetail tool bugs
-      # 4.ZTE pod1, os-nosdn-nofeature-ha and os-odl-bgpvpn-ha, run against danube
-      - trigger-builds:
-          - project: 'dovetail-fuel-{pod}-proposed_tests-{stream}'
-            current-parameters: false
-            predefined-parameters:
-              DEPLOY_SCENARIO={scenario}
-            block: true
-            same-node: true
-            block-thresholds:
-              build-step-failure-threshold: 'never'
-              failure-threshold: 'never'
-              unstable-threshold: 'FAILURE'
       - conditional-step:
           condition-kind: not
           condition-operand:
     name: 'fuel-os-onos-nofeature-ha-baremetal-daily-master-trigger'
     triggers:
       - timed: ''  # '5 8 * * *'
+- trigger:
+    name: 'fuel-os-ovn-nofeature-ha-baremetal-daily-master-trigger'
+    triggers:
+      - timed: ''
 - trigger:
     name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-master-trigger'
     triggers:
     name: 'fuel-os-onos-nofeature-noha-baremetal-daily-euphrates-trigger'
     triggers:
       - timed: ''
-- trigger:
-    name: 'fuel-os-ovn-nofeature-noha-baremetal-daily-euphrates-trigger'
-    triggers:
-      - timed: ''
 - trigger:
     name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-euphrates-trigger'
     triggers:
     name: 'fuel-os-onos-nofeature-ha-virtual-daily-master-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'fuel-os-ovn-nofeature-ha-virtual-daily-master-trigger'
+    triggers:
+      - timed: ''
 - trigger:
     name: 'fuel-os-nosdn-kvm-ha-virtual-daily-master-trigger'
     triggers:
     name: 'fuel-os-onos-nofeature-noha-virtual-daily-euphrates-trigger'
     triggers:
       - timed: ''  # '0 23 * * *'
-- trigger:
-    name: 'fuel-os-ovn-nofeature-noha-virtual-daily-euphrates-trigger'
-    triggers:
-      - timed: ''
 - trigger:
     name: 'fuel-os-nosdn-kvm-noha-virtual-daily-euphrates-trigger'
     triggers:
     name: 'fuel-os-onos-nofeature-ha-zte-pod1-daily-master-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'fuel-os-ovn-nofeature-ha-zte-pod1-daily-master-trigger'
+    triggers:
+      - timed: ''
 - trigger:
     name: 'fuel-os-nosdn-kvm-ha-zte-pod1-daily-master-trigger'
     triggers:
index 432bbbb..541cc78 100755 (executable)
@@ -177,9 +177,9 @@ if [[ ${DEPLOY_SCENARIO} =~ ^os-.* ]]; then
         run_tiers ${tiers}
     else
         if [ ${DEPLOY_TYPE} == 'baremetal' ]; then
-            tiers=(healthcheck smoke features vnf parser)
+            tiers=(healthcheck smoke patrole features vnf parser)
         else
-            tiers=(healthcheck smoke features)
+            tiers=(healthcheck smoke patrole features)
         fi
         run_tiers ${tiers}
     fi
index 099d01a..197e12a 100644 (file)
       stream: master
       branch: '{stream}'
       gs-pathname: ''
+      disabled: false
     euphrates: &euphrates
       stream: euphrates
       branch: 'stable/{stream}'
       gs-pathname: '/{stream}'
+      disabled: false
     # -------------------------------
     # POD, INSTALLER, AND BRANCH MAPPING
     # -------------------------------
     #       <<: *master
     # -------------------------------
 
-    testsuite:
-      - 'suite':
-          job-timeout: 60
-      - 'daily':
-          job-timeout: 300
-      - 'arm-daily':
-          job-timeout: 300
+    functest-tier:
+      - 'healthcheck':
+          job-timeout: 20
+      - 'smoke':
+          job-timeout: 180
+      - 'components':
+          job-timeout: 240
+      - 'patrole':
+          job-timeout: 20
+      - 'vnf':
+          job-timeout: 240
+      - 'parser':
+          job-timeout: 20
 
-    jobs:
-      - 'functest-{installer}-{pod}-{testsuite}-{stream}'
+    features-suite:
+      - 'doctor-notification'
+      - 'promise'
+      - 'bgpvpn'
+      - 'functest-odl-sfc'
+      - 'domino-multinode'
+      - 'fds'
+      - 'barometercollectd'
+
+    exclude:
+      - features-suite: 'promise'
+        stream: 'master'
+      - features-suite: 'domino-multinode'
+        stream: 'master'
+      - features-suite: 'patrole'
+        stream: 'euphrates'
+
+    build-job-settings: &build-job-settings
+      current-parameter: false
+      git-revision: true
+      node-parameters: false
+      kill-phase-on: FAILURE
+      abort-all-jobs: false
+      predefined-parameters: |
+        FUNCTEST_MODE=$FUNCTEST_MODE
+        FUNCTEST_TIER=$FUNCTEST_TIER
+
+    features-job-settings: &features-job-settings
+      current-parameter: false
+      git-revision: true
+      node-parameters: false
+      kill-phase-on: FAILURE
+      abort-all-jobs: false
+      predefined-parameters: |
+        FUNCTEST_MODE=$FUNCTEST_MODE
+        FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
 
+    jobs:
+      - 'functest-{installer}-{pod}-suite-{stream}'
+      - 'functest-{installer}-{pod}-daily-{stream}'
+      - 'functest-{installer}-{pod}-daily-{functest-tier}-{stream}'
+      - 'functest-{installer}-{pod}-daily-features-{features-suite}-{stream}'
 ################################
 # job template
 ################################
 - job-template:
-    name: 'functest-{installer}-{pod}-{testsuite}-{stream}'
+
+    name: 'functest-{installer}-{pod}-daily-{stream}'
+
+    project-type: multijob
+
+    disabled: '{obj:disabled}'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - '{installer}-defaults'
+      - '{slave-label}-defaults'
+      - functest-parameter:
+          gs-pathname: '{gs-pathname}'
+
+    builders:
+      - multijob:
+          name: 'Run healthcheck'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-healthcheck-{stream}'
+              <<: *build-job-settings
+      - multijob:
+          name: 'Run smoke'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-smoke-{stream}'
+              <<: *build-job-settings
+      - multijob:
+          name: 'Run patrole'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-patrole-{stream}'
+              <<: *build-job-settings
+
+      - multijob:
+          name: 'Run vnf'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-vnf-{stream}'
+              <<: *build-job-settings
+
+      - multijob:
+          name: 'Run doctor-notification'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-features-doctor-notification-{stream}'
+              <<: *features-job-settings
+
+      - multijob:
+          name: 'Run bgpvpn'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-features-bgpvpn-{stream}'
+              <<: *features-job-settings
+
+      - multijob:
+          name: 'Run odl-sfc'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-features-functest-odl-sfc-{stream}'
+              <<: *features-job-settings
+
+      - multijob:
+          name: 'Run barometercollectd'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-features-barometercollectd-{stream}'
+              <<: *features-job-settings
+
+      - multijob:
+          name: 'Run fds'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-features-fds-{stream}'
+              <<: *features-job-settings
+
+      - multijob:
+          name: 'Run promise'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-features-promise-{stream}'
+              <<: *features-job-settings
+
+      - multijob:
+          name: 'Run domino-multinode'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-features-domino-multinode-{stream}'
+              <<: *features-job-settings
+
+      - multijob:
+          name: 'Run parser'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-{installer}-{pod}-daily-parser-{stream}'
+              <<: *build-job-settings
+
+- job-template: &functest-installer-tier-job
+
+    name: 'functest-{installer}-{pod}-daily-{functest-tier}-{stream}'
 
     concurrent: true
 
           branch: '{branch}'
       - '{installer}-defaults'
       - '{slave-label}-defaults'
-      - 'functest-{testsuite}-parameter'
+      - string:
+          name: FUNCTEST_MODE
+          default: 'tier'
+      - string:
+          name: FUNCTEST_TIER
+          default: '{functest-tier}'
       - string:
           name: DEPLOY_SCENARIO
-          default: 'os-odl_l2-nofeature-ha'
+          default: 'os-nosdn-nofeature-noha'
       - string:
           name: CLEAN_DOCKER_IMAGES
           default: 'false'
     builders:
       - description-setter:
           description: "Built on $NODE_NAME"
-      - 'functest-{testsuite}-builder'
+      - 'functest-daily-builder'
+
+    publishers:
+      - 'functest-recipients'
+      - 'fuel-recipients'
+
+- job-template:
+
+    name: 'functest-{installer}-{pod}-suite-{stream}'
+    <<: *functest-installer-tier-job
+
+    wrappers:
+      - build-name:
+          name: '$BUILD_NUMBER Suite: $FUNCTEST_MODE Scenario: $DEPLOY_SCENARIO'
+      - timeout:
+          timeout: '60'
+          abort: true
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - '{installer}-defaults'
+      - '{slave-label}-defaults'
+      - 'functest-suite-parameter'
+      - string:
+          name: DEPLOY_SCENARIO
+          default: 'os-nosdn-nofeature-noha'
+      - string:
+          name: CLEAN_DOCKER_IMAGES
+          default: 'false'
+          description: 'Remove downloaded docker images (opnfv/functest*:*)'
+      - functest-parameter:
+          gs-pathname: '{gs-pathname}'
+
+    builders:
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - 'functest-suite-builder'
+
+- job-template:
+
+    name: 'functest-{installer}-{pod}-daily-features-{features-suite}-{stream}'
+    concurrent: true
+    properties:
+      - logrotate-default
+      - throttle:
+          enabled: true
+          max-per-node: 1
+          option: 'project'
+    wrappers:
+      - build-name:
+          name: '$BUILD_NUMBER Suite: $FUNCTEST_MODE Scenario: $DEPLOY_SCENARIO'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - '{installer}-defaults'
+      - '{slave-label}-defaults'
+      - string:
+          name: FUNCTEST_MODE
+          default: 'testcase'
+      - string:
+          name: FUNCTEST_SUITE_NAME
+          default: '{features-suite}'
+      - string:
+          name: DEPLOY_SCENARIO
+          default: 'os-nosdn-nofeature-noha'
+      - string:
+          name: CLEAN_DOCKER_IMAGES
+          default: 'false'
+          description: 'Remove downloaded docker images (opnfv/functest*:*)'
+      - functest-parameter:
+          gs-pathname: '{gs-pathname}'
+
+    scm:
+      - git-scm
+
+    builders:
+      - description-setter:
+          description: "Built on $NODE_NAME"
+      - 'functest-daily-builder'
+
+    publishers:
+      - 'functest-features-recipients'
+      - 'functest-recipients'
+      - 'fuel-recipients'
 
 
 ########################
           default: 'daily'
           description: "Daily suite name to run"
 
-- parameter:
-    name: functest-arm-daily-parameter
-    parameters:
-      - string:
-          name: FUNCTEST_MODE
-          default: 'arm-daily'
-          description: "Daily suite name (Aarch64) to run"
-
 - parameter:
     name: functest-suite-parameter
     parameters:
             - 'odl_netvirt'
             - 'snaps_smoke'
             - 'refstack_defcore'
+            - 'patrole'
             - 'promise'
             - 'doctor'
             - 'bgpvpn'
           choices:
             - 'healthcheck'
             - 'smoke'
+            - 'patrole'
             - 'features'
             - 'components'
             - 'vnf'
+            - 'parser'
           default: 'healthcheck'
       - string:
           name: TESTCASE_OPTIONS
       - 'functest-store-results'
       - 'functest-exit'
 
-- builder:
-    name: functest-arm-daily-builder
-    builders:
-      - 'functest-cleanup'
-      - 'functest-arm-daily'
-      - 'functest-store-results'
-      - 'functest-exit'
-
 - builder:
     name: functest-suite-builder
     builders:
                     - ../../utils/fetch_k8_conf.sh
                     - ./functest-k8.sh
 
-# yamllint enable rule:indentation
-- builder:
-    name: functest-arm-daily
-    builders:
-      # yamllint disable rule:indentation
-      - shell:
-          !include-raw:
-              - ./functest-env-presetup.sh
-              - ../../utils/fetch_os_creds.sh
-              - ./functest-alpine.sh
-
 # yamllint enable rule:indentation
 - builder:
     name: functest-store-results
     builders:
       - shell:
           !include-raw: ./functest-exit.sh
+
+
+- publisher:
+    name: 'functest-features-recipients'
+    publishers:
+      - email:
+          recipients:
+
+- publisher:
+    name: 'functest-recipients'
+    publishers:
+      - email:
+          recipients: >
+            jalausuch@suse.com morgan.richomme@orange.com
+            cedric.ollivier@orange.com feng.xiaowei@zte.com.cn
+            juha.kosonen@nokia.com wangwulin@huawei.com
+            delia.popescu@enea.com cristina.pauna@enea.com
+            valentin.boucher@kontron.com
+      - email-jenkins-admins-on-failure
+
+- publisher:
+    name: 'fuel-recipients'
+    publishers:
+      - email:
+          recipients: >
+            peter.barabas@ericsson.com mpolenchuck@mirantis.com
+            alexandru.avadanii@enea.com guillermo.herrero@enea.com
index 888aded..3f08e4a 100755 (executable)
@@ -18,6 +18,9 @@ if [[ ${INSTALLER_TYPE} == 'compass' ]]; then
     echo "export KUBE_MASTER_URL=$KUBE_MASTER_URL" >> $rc_file
     KUBE_MASTER_IP=$(echo $KUBE_MASTER_URL|awk -F'https://|:[0-9]+' '$0=$2')
     echo "export KUBE_MASTER_IP=$KUBE_MASTER_IP" >> $rc_file
+elif [[ ${INSTALLER_TYPE} == 'joid' && ${BRANCH} == 'master' ]]; then
+    admin_conf_file_vol="-v ${HOME}/joid_config/config:/root/joid_config/config"
+    rc_file=${HOME}/joid_config/k8config
 else
     echo "Not supported by other installers yet"
     exit 1
@@ -44,9 +47,10 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} \
 DOCKER_TAG=`[[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/}`
 
 FUNCTEST_IMAGE=opnfv/functest-kubernetes:${DOCKER_TAG}
+echo "Pulling Docker image ${FUNCTEST_IMAGE} ..."
 docker pull ${FUNCTEST_IMAGE}>/dev/null
 cmd_opt="run_tests -r -t all"
-cmd="docker run --rm --privileged=true ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
+cmd="docker run --rm --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
 echo "Running Functest k8s test cases, CMD: ${cmd}"
 eval ${cmd}
 ret_value=$?
diff --git a/jjb/functest/functest-kubernetes-project-jobs.yml b/jjb/functest/functest-kubernetes-project-jobs.yml
new file mode 100644 (file)
index 0000000..3eba5d1
--- /dev/null
@@ -0,0 +1,257 @@
+---
+###################################################
+# All the jobs except verify have been removed!
+# They will only be enabled on request by projects!
+###################################################
+- project:
+    name: functest-kubernetes-project-jobs
+
+    project: 'functest-kubernetes'
+
+    jobs:
+      - 'functest-kubernetes-verify-{stream}'
+      - 'functest-kubernetes-verify-{phase}-{stream}'
+      - 'functest-kubernetes-docs-upload-{stream}'
+
+    stream:
+      - master:
+          branch: '{stream}'
+          gs-pathname: ''
+          disabled: false
+      - euphrates:
+          branch: 'stable/{stream}'
+          gs-pathname: '/{stream}'
+          disabled: false
+
+    phase:
+      - 'unit-tests-and-docs':
+          slave-label: 'opnfv-build-ubuntu'
+      - 'build-x86_64':
+          slave-label: 'opnfv-build-ubuntu'
+      - 'build-aarch64':
+          slave-label: 'opnfv-build-ubuntu-arm'
+
+- job-template:
+    name: 'functest-kubernetes-verify-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    project-type: 'multijob'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+
+    scm:
+      - git-scm-gerrit
+
+    triggers:
+      - 'functest-kubernetes-verify-triggers-macro':
+          project: '{project}'
+          branch: '{branch}'
+
+    builders:
+      - shell: |
+          #!/bin/bash
+          # we do nothing here as the main stuff will be done
+          # in phase jobs
+          echo "Triggering phase jobs!"
+      - multijob:
+          name: 'functest-kubernetes-build-and-unittest'
+          execution-type: PARALLEL
+          projects:
+            - name: 'functest-kubernetes-verify-unit-tests-and-docs-{stream}'
+              current-parameters: false
+              predefined-parameters: |
+                GERRIT_BRANCH=$GERRIT_BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+              git-revision: true
+              node-parameters: false
+              kill-phase-on: FAILURE
+              abort-all-job: false
+            - name: 'functest-kubernetes-verify-build-x86_64-{stream}'
+              current-parameters: false
+              predefined-parameters: |
+                GERRIT_BRANCH=$GERRIT_BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                ARCH=x86_64
+              git-revision: true
+              node-parameters: false
+              kill-phase-on: FAILURE
+              abort-all-job: false
+            - name: 'functest-kubernetes-verify-build-aarch64-{stream}'
+              current-parameters: false
+              predefined-parameters: |
+                GERRIT_BRANCH=$GERRIT_BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                ARCH=aarch64
+              git-revision: true
+              node-parameters: false
+              kill-phase-on: FAILURE
+              abort-all-job: false
+
+- job-template:
+    name: 'functest-kubernetes-verify-{phase}-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    wrappers:
+      - ssh-agent-wrapper
+      - build-timeout:
+          timeout: 30
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - '{slave-label}-defaults'
+
+    scm:
+      - git-scm-gerrit
+
+    builders:
+      - 'functest-kubernetes-verify-{phase}-builders-macro'
+
+    publishers:
+      - 'functest-kubernetes-verify-{phase}-publishers-macro'
+
+- job-template:
+    name: 'functest-kubernetes-docs-upload-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+
+    scm:
+      - git-scm
+
+    triggers:
+      - 'functest-kubernetes-docs-upload-triggers-macro':
+          project: '{project}'
+          branch: '{branch}'
+
+    builders:
+      - functest-kubernetes-upload-doc-artifact
+
+################################
+# job triggers
+################################
+- trigger:
+    name: 'functest-kubernetes-verify-triggers-macro'
+    triggers:
+      - gerrit:
+          server-name: 'gerrit.opnfv.org'
+          trigger-on:
+            - patchset-created-event:
+                exclude-drafts: 'false'
+                exclude-trivial-rebase: 'false'
+                exclude-no-code-change: 'false'
+            - draft-published-event
+            - comment-added-contains-event:
+                comment-contains-value: 'recheck'
+            - comment-added-contains-event:
+                comment-contains-value: 'reverify'
+          projects:
+            - project-compare-type: 'ANT'
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: '**/{branch}'
+              disable-strict-forbidden-file-verification: 'true'
+              forbidden-file-paths:
+                - compare-type: ANT
+                  pattern: 'docs/**|.gitignore'
+
+- trigger:
+    name: 'functest-kubernetes-docs-upload-triggers-macro'
+    triggers:
+      - gerrit:
+          server-name: 'gerrit.opnfv.org'
+          trigger-on:
+            - change-merged-event
+            - comment-added-contains-event:
+                comment-contains-value: 'remerge'
+          projects:
+            - project-compare-type: 'ANT'
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: '**/{branch}'
+              disable-strict-forbidden-file-verification: 'true'
+              forbidden-file-paths:
+                - compare-type: ANT
+                  pattern: 'docs/**|.gitignore'
+################################
+# job builders
+################################
+
+- builder:
+    name: 'functest-kubernetes-verify-unit-tests-and-docs-builders-macro'
+    builders:
+      - shell: |
+          cd $WORKSPACE && tox
+
+- builder:
+    name: 'functest-kubernetes-verify-build-x86_64-builders-macro'
+    builders:
+      - shell: |
+          echo "Not activated!"
+
+- builder:
+    name: 'functest-kubernetes-verify-build-aarch64-builders-macro'
+    builders:
+      - shell: |
+          echo "Not activated!"
+
+- builder:
+    name: 'functest-kubernetes-upload-doc-artifact'
+    builders:
+      - shell: |
+          cd $WORKSPACE && tox -edocs
+            wget -O - https://git.opnfv.org/releng/plain/utils/upload-artifact.sh | bash -s "api/_build" "docs"
+################################
+# job publishers
+################################
+- publisher:
+    name: 'functest-kubernetes-verify-unit-tests-and-docs-publishers-macro'
+    publishers:
+      - junit:
+          results: nosetests.xml
+      - cobertura:
+          report-file: "coverage.xml"
+          only-stable: "true"
+          health-auto-update: "true"
+          stability-auto-update: "true"
+          zoom-coverage-chart: "true"
+          targets:
+            - files:
+                healthy: 10
+                unhealthy: 20
+                failing: 30
+            - method:
+                healthy: 50
+                unhealthy: 40
+                failing: 30
+      - email-jenkins-admins-on-failure
+
+- publisher:
+    name: 'functest-kubernetes-verify-build-x86_64-publishers-macro'
+    publishers:
+      - email-jenkins-admins-on-failure
+
+- publisher:
+    name: 'functest-kubernetes-verify-build-aarch64-publishers-macro'
+    publishers:
+      - email-jenkins-admins-on-failure
diff --git a/jjb/functest/xtesting-project-jobs.yml b/jjb/functest/xtesting-project-jobs.yml
new file mode 100644 (file)
index 0000000..bf08775
--- /dev/null
@@ -0,0 +1,257 @@
+---
+###################################################
+# All the jobs except verify have been removed!
+# They will only be enabled on request by projects!
+###################################################
+- project:
+    name: xtesting-project-jobs
+
+    project: 'functest-xtesting'
+
+    jobs:
+      - 'xtesting-verify-{stream}'
+      - 'xtesting-verify-{phase}-{stream}'
+      - 'xtesting-docs-upload-{stream}'
+
+    stream:
+      - master:
+          branch: '{stream}'
+          gs-pathname: ''
+          disabled: false
+      - euphrates:
+          branch: 'stable/{stream}'
+          gs-pathname: '/{stream}'
+          disabled: false
+
+    phase:
+      - 'unit-tests-and-docs':
+          slave-label: 'opnfv-build-ubuntu'
+      - 'build-x86_64':
+          slave-label: 'opnfv-build-ubuntu'
+      - 'build-aarch64':
+          slave-label: 'opnfv-build-ubuntu-arm'
+
+- job-template:
+    name: 'xtesting-verify-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    project-type: 'multijob'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+
+    scm:
+      - git-scm-gerrit
+
+    triggers:
+      - 'xtesting-verify-triggers-macro':
+          project: '{project}'
+          branch: '{branch}'
+
+    builders:
+      - shell: |
+          #!/bin/bash
+          # we do nothing here as the main stuff will be done
+          # in phase jobs
+          echo "Triggering phase jobs!"
+      - multijob:
+          name: 'xtesting-build-and-unittest'
+          execution-type: PARALLEL
+          projects:
+            - name: 'xtesting-verify-unit-tests-and-docs-{stream}'
+              current-parameters: false
+              predefined-parameters: |
+                GERRIT_BRANCH=$GERRIT_BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+              git-revision: true
+              node-parameters: false
+              kill-phase-on: FAILURE
+              abort-all-job: false
+            - name: 'xtesting-verify-build-x86_64-{stream}'
+              current-parameters: false
+              predefined-parameters: |
+                GERRIT_BRANCH=$GERRIT_BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                ARCH=x86_64
+              git-revision: true
+              node-parameters: false
+              kill-phase-on: FAILURE
+              abort-all-job: false
+            - name: 'xtesting-verify-build-aarch64-{stream}'
+              current-parameters: false
+              predefined-parameters: |
+                GERRIT_BRANCH=$GERRIT_BRANCH
+                GERRIT_REFSPEC=$GERRIT_REFSPEC
+                GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                ARCH=aarch64
+              git-revision: true
+              node-parameters: false
+              kill-phase-on: FAILURE
+              abort-all-job: false
+
+- job-template:
+    name: 'xtesting-verify-{phase}-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    wrappers:
+      - ssh-agent-wrapper
+      - build-timeout:
+          timeout: 30
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - '{slave-label}-defaults'
+
+    scm:
+      - git-scm-gerrit
+
+    builders:
+      - 'xtesting-verify-{phase}-builders-macro'
+
+    publishers:
+      - 'xtesting-verify-{phase}-publishers-macro'
+
+- job-template:
+    name: 'xtesting-docs-upload-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+
+    scm:
+      - git-scm
+
+    triggers:
+      - 'xtesting-docs-upload-triggers-macro':
+          project: '{project}'
+          branch: '{branch}'
+
+    builders:
+      - xtesting-upload-doc-artifact
+
+################################
+# job triggers
+################################
+- trigger:
+    name: 'xtesting-verify-triggers-macro'
+    triggers:
+      - gerrit:
+          server-name: 'gerrit.opnfv.org'
+          trigger-on:
+            - patchset-created-event:
+                exclude-drafts: 'false'
+                exclude-trivial-rebase: 'false'
+                exclude-no-code-change: 'false'
+            - draft-published-event
+            - comment-added-contains-event:
+                comment-contains-value: 'recheck'
+            - comment-added-contains-event:
+                comment-contains-value: 'reverify'
+          projects:
+            - project-compare-type: 'ANT'
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: '**/{branch}'
+              disable-strict-forbidden-file-verification: 'true'
+              forbidden-file-paths:
+                - compare-type: ANT
+                  pattern: 'docs/**|.gitignore'
+
+- trigger:
+    name: 'xtesting-docs-upload-triggers-macro'
+    triggers:
+      - gerrit:
+          server-name: 'gerrit.opnfv.org'
+          trigger-on:
+            - change-merged-event
+            - comment-added-contains-event:
+                comment-contains-value: 'remerge'
+          projects:
+            - project-compare-type: 'ANT'
+              project-pattern: '{project}'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: '**/{branch}'
+              disable-strict-forbidden-file-verification: 'true'
+              forbidden-file-paths:
+                - compare-type: ANT
+                  pattern: 'docs/**|.gitignore'
+################################
+# job builders
+################################
+
+- builder:
+    name: 'xtesting-verify-unit-tests-and-docs-builders-macro'
+    builders:
+      - shell: |
+          cd $WORKSPACE && tox
+
+- builder:
+    name: 'xtesting-verify-build-x86_64-builders-macro'
+    builders:
+      - shell: |
+          echo "Not activated!"
+
+- builder:
+    name: 'xtesting-verify-build-aarch64-builders-macro'
+    builders:
+      - shell: |
+          echo "Not activated!"
+
+- builder:
+    name: 'xtesting-upload-doc-artifact'
+    builders:
+      - shell: |
+          cd $WORKSPACE && tox -edocs
+            wget -O - https://git.opnfv.org/releng/plain/utils/upload-artifact.sh | bash -s "api/_build" "docs"
+################################
+# job publishers
+################################
+- publisher:
+    name: 'xtesting-verify-unit-tests-and-docs-publishers-macro'
+    publishers:
+      - junit:
+          results: nosetests.xml
+      - cobertura:
+          report-file: "coverage.xml"
+          only-stable: "true"
+          health-auto-update: "true"
+          stability-auto-update: "true"
+          zoom-coverage-chart: "true"
+          targets:
+            - files:
+                healthy: 10
+                unhealthy: 20
+                failing: 30
+            - method:
+                healthy: 50
+                unhealthy: 40
+                failing: 30
+      - email-jenkins-admins-on-failure
+
+- publisher:
+    name: 'xtesting-verify-build-x86_64-publishers-macro'
+    publishers:
+      - email-jenkins-admins-on-failure
+
+- publisher:
+    name: 'xtesting-verify-build-aarch64-publishers-macro'
+    publishers:
+      - email-jenkins-admins-on-failure
index e2fcfd6..6cd83f1 100755 (executable)
@@ -8,18 +8,39 @@
 ##############################################################################
 
 source $WORKSPACE/installer_track.sh
-echo """
-    INSTALLER: $INSTALLER
-    INSTALLER_VERSION: $INSTALLER_VERSION
-    JOB_NAME: $JOB_NAME
-    BUILD_ID: $BUILD_ID
-    SENARIO: $DEPLOY_SCENARIO
-    UPSTREAM_JOB_NAME: $UPSTREAM_JOB_NAME:
-    UPSTREAM_BUILD_ID: $UPSTREAM_BUILD_ID
-    PROVISION_RESULT: $PROVISION_RESULT
-    TIMESTAMP_START: $TIMESTAMP_START
-    TIMESTAMP_END: `date '+%Y-%m-%d %H:%M:%S.%3N'`
-    POD_NAME: $NODE_NAME
-"""
 
-# TODO call TestAPI to report installer provisoin result when API is ready
+gen_content()
+{
+    cat <<EOF
+{
+    "installer": "$INSTALLER",
+    "version": "$INSTALLER_VERSION",
+    "pod_name": "$NODE_NAME",
+    "job_name": "$JOB_NAME",
+    "build_id": "$BUILD_ID",
+    "scenario": "$DEPLOY_SCENARIO",
+    "upstream_job_name": "$UPSTREAM_JOB_NAME",
+    "upstream_build_id":"$UPSTREAM_BUILD_ID",
+    "criteria": "$PROVISION_RESULT",
+    "start_date": "$TIMESTAMP_START",
+    "stop_date": "$TIMESTAMP_END",
+    "details":""
+}
+EOF
+}
+
+echo "Installer: $INSTALLER provision result: $PROVISION_RESULT"
+echo $(gen_content)
+
+set -o xtrace
+curl -H "Content-Type: application/json" -X POST -v -d "$(gen_content)" \
+    $TESTAPI_URL/deployresults || true
+
+# INFO
+# postbuildscript plugin shall always return the original job running status,
+# for the result returned from postbuildscript affects the CI pipeline.
+if [ "$PROVISION_RESULT" == "PASS" ]; then
+    exit 0
+else
+    exit 1
+fi
index 3433cee..8f03234 100644 (file)
           name: GERRIT_REFSPEC
           default: 'refs/heads/{branch}'
           description: "Default refspec needed for manually triggering."
+      - string:
+          name: TESTAPI_URL
+          default: 'http://testresults.opnfv.org/test/api/v1'
+          description: "Default TestAPI URL, currently using v1"
 
 - property:
     name: logrotate-default
           script-only-if-succeeded: true
           builders:
             - shell: |
-                echo "export PROVISION_RESULT=SUCCEED" >> $WORKSPACE/installer_track.sh
-                echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+                echo "export PROVISION_RESULT=PASS" >> $WORKSPACE/installer_track.sh
+                echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
+                echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' > $WORKSPACE/installer_track.sh
             - shell:
-                !include-raw-escape: installer-report.sh
+                !include-raw: installer-report.sh
       - postbuildscript:
           script-only-if-succeeded: false
           script-only-if-failed: true
           builders:
             - shell: |
                 echo "export PROVISION_RESULT=FAIL" >> $WORKSPACE/installer_track.sh
-                echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+                echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
+                echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' > $WORKSPACE/installer_track.sh
             - shell:
-                !include-raw-escape: installer-report.sh
+                !include-raw: installer-report.sh
index 7251d3f..3ef2f04 100644 (file)
                 - compare-type: ANT
                   pattern: '**/*.yaml'
                 - compare-type: ANT
-                  pattern: 'config/installers/**/*.j2'
+                  pattern: 'config/utils/*.py'
                 - compare-type: ANT
-                  pattern: 'check-jinja2.sh'
+                  pattern: 'config/installers/**/*.j2'
                 - compare-type: ANT
-                  pattern: 'check-schema.sh'
+                  pattern: 'check-*.sh'
           skip-vote:
             successful: false
             failed: false
index 103069f..b130912 100644 (file)
           branch: '{stream}'
           gs-pathname: ''
           disabled: false
-      - euphrates:
-          branch: 'stable/{stream}'
-          gs-pathname: '/{stream}'
-          disabled: false
 
     pod:
       - zte-virtual6:
index d9d3e72..5c0bb88 100644 (file)
       - compute:
           installer: apex
           pod: zte-virtual5
+          sut: node
           <<: *master
       - storage:
           installer: apex
           pod: zte-virtual5
+          sut: ''
           <<: *master
-      - compute:
-          installer: apex
-          pod: zte-virtual5
-          <<: *euphrates
-      - storage:
-          installer: apex
-          pod: zte-virtual5
-          <<: *euphrates
       - compute:
           installer: fuel
           pod: zte-virtual6
+          sut: vnf
           <<: *master
 
     # -------------------------------
       - string:
           name: OPNFV_RELEASE
           default: '{stream}'
+      - string:
+          name: SUT
+          description: "System Under Test"
+          default: '{sut}'
     scm:
       - git-scm
 
index 7f14224..5fbb37c 100644 (file)
@@ -27,6 +27,8 @@
       - 'db'
       - 'deck'
       - 'tasks-base'
+      - 'tasks-k8s'
+      - 'tasks-osa'
 
     # settings for jobs run in multijob phases
     build-job-settings: &build-job-settings
               <<: *build-job-settings
             - name: 'compass-tasks-build-amd64-{stream}'
               <<: *build-job-settings
+            - name: 'compass-tasks-k8s-build-amd64-{stream}'
+              <<: *build-job-settings
+            - name: 'compass-tasks-osa-build-amd64-{stream}'
+              <<: *build-job-settings
 
     publishers:
       - 'compass-amd64-recipients'
index 584dc30..7c576cf 100644 (file)
@@ -29,6 +29,7 @@
       - 'features'
       - 'components'
       - 'parser'
+      - 'patrole'
       - 'smoke'
       - 'vnf'
       - 'restapi'
               <<: *build-job-settings
             - name: 'functest-parser-docker-build-arm64-{stream}'
               <<: *build-job-settings
+            - name: 'functest-patrole-docker-build-amd64-{stream}'
+              <<: *build-job-settings
+            - name: 'functest-patrole-docker-build-arm64-{stream}'
+              <<: *build-job-settings
             - name: 'functest-smoke-docker-build-amd64-{stream}'
               <<: *build-job-settings
             - name: 'functest-smoke-docker-build-arm64-{stream}'
               <<: *manifest-job-settings
             - name: 'functest-parser-docker-manifest-{stream}'
               <<: *manifest-job-settings
+            - name: 'functest-patrole-docker-manifest-{stream}'
+              <<: *manifest-job-settings
             - name: 'functest-smoke-docker-manifest-{stream}'
               <<: *manifest-job-settings
             - name: 'functest-vnf-docker-manifest-{stream}'
           name: GIT_BASE
           default: https://gerrit.opnfv.org/gerrit/$PROJECT
           description: 'Git URL to use on this Jenkins Slave'
+      - string:
+          name: REPO
+          default: "opnfv"
+          description: "Repository name for functest images"
+
 
     disabled: '{obj:disabled}'
 
           esac
           sudo manifest-tool push from-args \
               --platforms linux/amd64,linux/arm64 \
-              --template opnfv/functest-{image}:ARCH-$tag \
-              --target opnfv/functest-{image}:$tag
+              --template $REPO/functest-{image}:ARCH-$tag \
+              --target $REPO/functest-{image}:$tag
           exit $?
 
 # parameter macro
           name: PROJECT
           default: "{project}"
           description: "Project name used to enable job conditions"
+      - string:
+          name: REPO
+          default: "opnfv"
+          description: "Repository name for functest images"
 
 # publisher macros
 - publisher:
index 28e5b7c..5c8cafb 100644 (file)
@@ -111,7 +111,7 @@ fi
 echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG"
 echo "--------------------------------------------------------"
 echo
-cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BUILD_BRANCH
+cmd="docker build --pull=true --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BUILD_BRANCH
     $ARCH_BUILD_ARG
     -f $DOCKERFILE $DOCKER_PATH"
 
index f7abcac..ac0869d 100644 (file)
           dockerdir: 'docker/barometer-ves'
           <<: *master
           <<: *other-receivers
+      - 'barometer-snmp':
+          project: 'barometer'
+          dockerdir: 'docker/barometer-snmp'
+          <<: *master
+          <<: *other-receivers
       - 'bottlenecks':
           project: 'bottlenecks'
           <<: *master
           project: 'yardstick'
           <<: *euphrates
           <<: *other-receivers
+      - 'xtesting':
+          project: 'functest-xtesting'
+          <<: *master
+          <<: *other-receivers
       # projects with jobs for danube
       - 'dovetail':
           project: 'dovetail'
similarity index 73%
rename from jjb/releng/automate.yml
rename to jjb/releng/testresults-automate.yml
index 6bd952a..01fbe0c 100644 (file)
@@ -1,6 +1,6 @@
 ---
 - project:
-    name: utils-automate
+    name: testresults-automate
     stream:
       - master:
           branch: '{stream}'
@@ -17,7 +17,6 @@
     jobs:
       - '{module}-automate-{stream}'
       - '{module}-automate-{phase}-{stream}'
-      - '{module}-verify-{stream}'
 
     project: 'releng-testresults'
 
           notify-every-unstable-build: true
           send-to-individuals: true
 
-- job-template:
-    name: '{module}-verify-{stream}'
-
-    parameters:
-      - project-parameter:
-          project: '{project}'
-          branch: '{branch}'
-      - 'opnfv-build-ubuntu-defaults'
-
-    scm:
-      - git-scm-gerrit
-
-    triggers:
-      - gerrit:
-          server-name: 'gerrit.opnfv.org'
-          trigger-on:
-            - patchset-created-event:
-                exclude-drafts: 'false'
-                exclude-trivial-rebase: 'false'
-                exclude-no-code-change: 'false'
-            - draft-published-event
-            - comment-added-contains-event:
-                comment-contains-value: 'recheck'
-            - comment-added-contains-event:
-                comment-contains-value: 'reverify'
-          projects:
-            - project-compare-type: 'ANT'
-              project-pattern: '{project}'
-              branches:
-                - branch-compare-type: 'ANT'
-                  branch-pattern: '**/{branch}'
-              file-paths:
-                - compare-type: 'ANT'
-                  pattern: '{module}/**'
-
-    builders:
-      - shell: |
-          cd {module}/
-          tox
-          if [ -e *.xml ];then
-              cp *.xml $WORKSPACE
-          fi
-
-    publishers:
-      - publish-coverage
-      - email-jenkins-admins-on-failure
-
 - job-template:
     name: '{module}-automate-{stream}'
 
           fail: true
 
     triggers:
-      - gerrit:
-          server-name: 'gerrit.opnfv.org'
-          trigger-on:
-            - change-merged-event
-            - comment-added-contains-event:
-                comment-contains-value: 'remerge'
-          projects:
-            - project-compare-type: 'ANT'
-              project-pattern: '{project}'
-              branches:
-                - branch-compare-type: 'ANT'
-                  branch-pattern: '**/{branch}'
-              file-paths:
-                - compare-type: 'ANT'
-                  pattern: '{module}/**'
+      - gerrit-trigger-change-merged:
+          project: '**'
+          branch: '{branch}'
+          files: '{module}/**'
 
     builders:
       - description-setter:
diff --git a/jjb/releng/testresults-verify.yml b/jjb/releng/testresults-verify.yml
new file mode 100644 (file)
index 0000000..958833c
--- /dev/null
@@ -0,0 +1,78 @@
+---
+- project:
+    name: testresults-verify
+    stream:
+      - master:
+          branch: '{stream}'
+
+    module:
+      - 'testapi'
+      - 'reporting'
+
+    jobs:
+      - '{module}-verify-{stream}'
+      - '{module}-client-verify-{stream}'
+
+    project: 'releng-testresults'
+
+- job-template:
+    name: '{module}-verify-{stream}'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+
+    scm:
+      - git-scm-gerrit
+
+    triggers:
+      - gerrit-trigger-patchset-created:
+          server: 'gerrit.opnfv.org'
+          project: '**'
+          branch: '{branch}'
+          files: '{module}/**'
+
+    builders:
+      - shell: |
+          cd {module}/
+          tox
+          if [ -e *.xml ];then
+              cp *.xml $WORKSPACE
+          fi
+
+    publishers:
+      - publish-coverage
+      - email-jenkins-admins-on-failure
+
+- job-template:
+    name: '{module}-client-verify-{stream}'
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - 'opnfv-build-ubuntu-defaults'
+
+    scm:
+      - git-scm-gerrit
+
+    triggers:
+      - gerrit-trigger-patchset-created:
+          server: 'gerrit.opnfv.org'
+          project: '**'
+          branch: '{branch}'
+          files: '{module}/{module}-client/**'
+
+    builders:
+      - shell: |
+          cd {module}/{module}-client
+          tox
+          if [ -e *.xml ];then
+              cp *.xml $WORKSPACE
+          fi
+
+    publishers:
+      - publish-coverage
+      - email-jenkins-admins-on-failure
index d3a37ce..9219d00 100755 (executable)
@@ -46,6 +46,6 @@ export XCI_UPDATE_CLEAN_VM_OS=true
 
 ./xci/scripts/vm/start-new-vm.sh $VM_DISTRO
 
-rsync -a -e "ssh -F $HOME/.ssh/xci-vm-config" $WORKSPACE/ ${VM_DISTRO}_xci_vm:~/bifrost
+rsync -a -e "ssh -F $HOME/.ssh/${VM_DISTRO}-xci-vm-config" $WORKSPACE/ ${VM_DISTRO}_xci_vm:~/bifrost
 
-ssh -F $HOME/.ssh/xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost/releng-xci && ./bifrost_test.sh"
+ssh -F $HOME/.ssh/${VM_DISTRO}-xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost/releng-xci && ./bifrost_test.sh"
index 64daa69..6c2d165 100644 (file)
           export FUNCTEST_MODE=$FUNCTEST_MODE
           export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
           export XCI_FLAVOR=$XCI_FLAVOR
+          export CORE_OPENSTACK_INSTALL=true
           export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
           export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
           export INSTALLER_TYPE=$INSTALLER_TYPE
       - shell: |
           #!/bin/bash
 
-          ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
+          ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
 
 
 - builder:
       - shell: |
           #!/bin/bash
 
-          sudo virsh destroy ${DISTRO}_xci_vm
-          sudo virsh undefine ${DISTRO}_xci_vm
+          sudo virsh destroy ${DISTRO}_xci_vm || true
+          sudo virsh undefine ${DISTRO}_xci_vm || true
 
 # this will be enabled once the xci is prepared
 # - builder:
index 45b4ec2..ce84830 100755 (executable)
@@ -20,5 +20,5 @@ if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
     exit 0
 fi
 
-sudo virsh destroy ${DISTRO}_xci_vm
-sudo virsh undefine ${DISTRO}_xci_vm
+sudo virsh destroy ${DISTRO}_xci_vm || true
+sudo virsh undefine ${DISTRO}_xci_vm || true
index b2421de..9bcc469 100755 (executable)
@@ -20,6 +20,18 @@ if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
     exit 0
 fi
 
+# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since
+# the project where the scenario is coming from is cloned and the patch checked out to the
+# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM
+# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins.
+# if the change is coming to releng-xci, we don't need to do anything since the patch is checked
+# out to the WORKSPACE anyways
+if [[ $GERRIT_PROJECT != "releng-xci" ]]; then
+    cd $HOME && /bin/rm -rf $WORKSPACE
+    git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE
+    chmod -R go-rwx $WORKSPACE/xci/scripts/vm
+fi
+
 # skip the deployment if the scenario is not supported on this distro
 OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
 if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
@@ -27,4 +39,10 @@ if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENT
     exit 0
 fi
 
-ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci/xci && PATH=/home/devuser/.local/bin:$PATH ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/run-functest.yml"
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "cd releng-xci/xci && PATH=/home/devuser/.local/bin:$PATH 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"
+echo "Functest log"
+echo "---------------------------------------------------------------------------------"
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat /root/results/functest.log"
+echo "---------------------------------------------------------------------------------"
diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh
new file mode 100755 (executable)
index 0000000..764857b
--- /dev/null
@@ -0,0 +1,80 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+set -o errexit
+set -o nounset
+set -o pipefail
+
+#----------------------------------------------------------------------
+# This script is used by CI and executed by Jenkins jobs.
+# You are not supposed to use this script manually if you don't know
+# what you are doing.
+#----------------------------------------------------------------------
+
+WORK_DIRECTORY=/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO
+/bin/rm -rf $WORK_DIRECTORY && mkdir -p $WORK_DIRECTORY
+
+# ensure GERRIT_TOPIC is set
+GERRIT_TOPIC="${GERRIT_TOPIC:-''}"
+
+# skip the healthcheck if the patch doesn't impact the deployment
+if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
+    echo "Skipping verify!"
+    echo "DEPLOY_SCENARIO=os-nosdn-nofeature" > $WORK_DIRECTORY/scenario.properties
+    exit 0
+fi
+
+# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since
+# the project where the scenario is coming from is cloned and the patch checked out to the
+# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM
+# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins.
+# if the change is coming to releng-xci, we don't need to do anything since the patch is checked
+# out to the WORKSPACE anyways
+if [[ $GERRIT_PROJECT != "releng-xci" ]]; then
+    cd $HOME && /bin/rm -rf $WORKSPACE
+    git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE
+    chmod -R go-rwx $WORKSPACE/xci/scripts/vm
+fi
+
+# if change is coming to releng-xci, continue as usual until that part is fixed as well
+if [[ $GERRIT_PROJECT == "releng-xci" ]]; then
+    # save the scenario name into java properties file to be injected to downstream jobs via envInject
+    echo "Recording scenario name for downstream jobs"
+    echo "DEPLOY_SCENARIO=os-nosdn-nofeature" > $WORK_DIRECTORY/scenario.properties
+    exit 0
+fi
+
+# projects develop different scenarios and jobs need to know which scenario got the
+# change under test so the jobs can deploy and test the right scenario.
+# we need to fetch the change and look at the changeset to find out the scenario instead
+# of hardcoding scenario per project.
+
+git clone https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $WORK_DIRECTORY/$GERRIT_PROJECT
+cd $WORK_DIRECTORY/$GERRIT_PROJECT
+git fetch https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $GERRIT_REFSPEC && git checkout FETCH_HEAD
+DEPLOY_SCENARIO=$(git diff HEAD^..HEAD --name-only | grep scenarios | awk -F '[/|/]' '{print $2}' | uniq)
+
+# ensure single scenario is impacted
+if [[ $(echo $DEPLOY_SCENARIO | wc -w) != 1 ]]; then
+    echo "Change impacts multiple scenarios!"
+    echo "XCI doesn't support testing of changes that impact multiple scenarios currently."
+    echo "Please split your change into multiple different/dependent changes, each modifying single scenario."
+    exit 1
+fi
+
+# save the scenario name into java properties file to be injected to downstream jobs via envInject
+echo "Recording scenario name '$DEPLOY_SCENARIO' for downstream jobs"
+echo "DEPLOY_SCENARIO=$DEPLOY_SCENARIO" > $WORK_DIRECTORY/scenario.properties
+
+# skip the deployment if the scenario is not supported on this distro
+OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
+if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
+    echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO"
+    exit 0
+fi
index e86f5b3..0628829 100755 (executable)
@@ -20,6 +20,18 @@ if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then
     exit 0
 fi
 
+# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since
+# the project where the scenario is coming from is cloned and the patch checked out to the
+# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM
+# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins.
+# if the change is coming to releng-xci, we don't need to do anything since the patch is checked
+# out to the WORKSPACE anyways
+if [[ $GERRIT_PROJECT != "releng-xci" ]]; then
+    cd $HOME && /bin/rm -rf $WORKSPACE
+    git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE
+    chmod -R go-rwx $WORKSPACE/xci/scripts/vm
+fi
+
 # skip the deployment if the scenario is not supported on this distro
 OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
 if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
@@ -27,4 +39,4 @@ if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENT
     exit 0
 fi
 
-ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh"
index b38ebe5..c2f1f99 100755 (executable)
@@ -20,6 +20,18 @@ if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
     exit 0
 fi
 
+# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since
+# the project where the scenario is coming from is cloned and the patch checked out to the
+# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM
+# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins.
+# if the change is coming to releng-xci, we don't need to do anything since the patch is checked
+# out to the WORKSPACE anyways
+if [[ $GERRIT_PROJECT != "releng-xci" ]]; then
+    cd $HOME && /bin/rm -rf $WORKSPACE
+    git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE
+    chmod -R go-rwx $WORKSPACE/xci/scripts/vm
+fi
+
 # skip the deployment if the scenario is not supported on this distro
 OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml
 if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then
@@ -41,6 +53,8 @@ export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
 export FUNCTEST_MODE=$FUNCTEST_MODE
 export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
 export XCI_FLAVOR=$XCI_FLAVOR
+export CORE_OPENSTACK_INSTALL=true
+export BIFROST_USE_PREBUILT_IMAGES=true
 export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
 export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
 export INSTALLER_TYPE=$INSTALLER_TYPE
index c6b6bc4..c54a1b9 100644 (file)
                 comment-contains-value: 'reverify'
           projects:
             - project-compare-type: 'ANT'
-              project-pattern: '{project}'
+              project-pattern: 'releng-xci'
               branches:
                 - branch-compare-type: 'ANT'
                   branch-pattern: '**/{branch}'
               forbidden-file-paths:
                 - compare-type: ANT
                   pattern: 'xci/scripts/vm/**'
+            - project-compare-type: 'REG_EXP'
+              project-pattern: 'sfc|sdnvpn'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: '**/{branch}'
+              disable-strict-forbidden-file-verification: 'true'
+              file-paths:
+                - compare-type: ANT
+                  pattern: 'scenarios/**'
           readable-message: true
           custom-url: '* $JOB_NAME $BUILD_URL'
           skip-vote:
 
     parameters:
       - project-parameter:
-          project: '{project}'
+          project: $GERRIT_PROJECT
           branch: '{branch}'
       - label:
           name: SLAVE_LABEL
           default: 'xci-virtual'
+      - string:
+          name: DISTRO
+          default: '{distro}'
       - string:
           name: CLEAN_DIB_IMAGES
           default: 'true'
           description: 'Git URL to use on this Jenkins Slave'
 
     builders:
+      - 'xci-verify-set-scenario-macro'
+      - inject:
+          properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
       - description-setter:
-          description: "Built on $NODE_NAME"
+          description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
       - multijob:
           name: deploy
           condition: SUCCESSFUL
               current-parameters: true
               predefined-parameters: |
                 DISTRO={distro}
-                DEPLOY_SCENARIO=os-nosdn-nofeature
                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
+                GERRIT_PROJECT=$GERRIT_PROJECT
                 GERRIT_BRANCH=$GERRIT_BRANCH
                 GERRIT_REFSPEC=$GERRIT_REFSPEC
                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
               current-parameters: true
               predefined-parameters: |
                 DISTRO={distro}
-                DEPLOY_SCENARIO=os-nosdn-nofeature
                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
-                FUNCTEST_MODE=tier
-                FUNCTEST_TIER=healthcheck
+                GERRIT_PROJECT=$GERRIT_PROJECT
                 GERRIT_BRANCH=$GERRIT_BRANCH
                 GERRIT_REFSPEC=$GERRIT_REFSPEC
                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                FUNCTEST_MODE=tier
+                FUNCTEST_TIER=healthcheck
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: true
     parameters:
       - string:
           name: PROJECT
-          default: 'releng-xci'
+          default: $GERRIT_PROJECT
       - string:
           name: DISTRO
           default: 'ubuntu'
-      - string:
-          name: DEPLOY_SCENARIO
-          default: 'os-nosdn-nofeature'
       - string:
           name: FUNCTEST_MODE
           default: 'tier'
           description: 'Git URL to use on this Jenkins Slave'
 
     wrappers:
+      - inject:
+          properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
       - ssh-agent-wrapper
       - build-timeout:
           timeout: 240
 
     builders:
       - description-setter:
-          description: "Built on $NODE_NAME"
+          description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME"
       - 'xci-verify-{phase}-macro'
 
 # -------------------------------
 # builder macros
 # -------------------------------
+- builder:
+    name: 'xci-verify-set-scenario-macro'
+    builders:
+      - shell:
+          !include-raw: ./xci-set-scenario.sh
+
 - builder:
     name: 'xci-verify-deploy-macro'
     builders:
 - builder:
     name: 'xci-verify-healthcheck-macro'
     builders:
+      - shell:
+          !include-raw: ./xci-run-functest.sh
       - shell:
           !include-raw: ./xci-cleanup.sh
index 481af2a..20890fa 100644 (file)
           <<: *euphrates
       # daisy CI PODs
       - baremetal:
-          slave-label: zte-pod3
+          slave-label: daisy-baremetal
           installer: daisy
           auto-trigger-name: 'daily-trigger-disabled'
           <<: *master
index f0e4f8e..2fd6848 100755 (executable)
@@ -50,7 +50,7 @@ opts="--privileged=true --rm"
 envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
     -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \
     -e YARDSTICK_BRANCH=${BRANCH} -e BRANCH=${BRANCH} \
-    -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
+    -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} -e CI_DEBUG=true"
 
 if [[ "${INSTALLER_TYPE}" == 'fuel' ]]; then
     envs+=" -e SSH_KEY=/root/.ssh/mcp.rsa"
index e2fee29..c036663 100644 (file)
           set -o errexit
           set -o pipefail
 
+          sudo apt-get -y autoremove
           sudo apt-get install -y build-essential python-dev python3-dev
+          sudo apt-get -y clean && sudo apt-get -y autoremove
 
           echo "Running unit tests in Python 2.7 ..."
           cd $WORKSPACE
           set -o errexit
           set -o pipefail
 
+          sudo apt-get -y autoremove
           sudo apt-get install -y build-essential python-dev python3-dev
+          sudo apt-get -y clean && sudo apt-get -y autoremove
 
           echo "Running unit tests in Python 3 ..."
           cd $WORKSPACE
           set -o errexit
           set -o pipefail
 
+          sudo apt-get -y autoremove
           sudo apt-get install -y build-essential python-dev python3-dev
+          sudo apt-get -y clean && sudo apt-get -y autoremove
 
           echo "Running functional tests in Python 2.7 ..."
           cd $WORKSPACE
           set -o errexit
           set -o pipefail
 
+          sudo apt-get -y autoremove
           sudo apt-get install -y build-essential python-dev python3-dev
+          sudo apt-get -y clean && sudo apt-get -y autoremove
 
           echo "Running functional tests in Python 3 ..."
           cd $WORKSPACE
           set -o errexit
           set -o pipefail
 
+          sudo apt-get -y autoremove
           sudo apt-get install -y build-essential python-dev python3-dev
+          sudo apt-get -y clean && sudo apt-get -y autoremove
 
           echo "Running coverage tests ..."
           cd $WORKSPACE
           set -o errexit
           set -o pipefail
 
+          sudo apt-get -y autoremove
           sudo apt-get install -y build-essential python-dev python3-dev
+          sudo apt-get -y clean && sudo apt-get -y autoremove
 
           echo "Running style guidelines (PEP8) tests ..."
           cd $WORKSPACE
index f82fa54..32c07f8 100755 (executable)
@@ -52,12 +52,14 @@ else
     touch $dest_path || error "Cannot create the file specified. Check that the path is correct and run the script again."
 fi
 
-info "Fetching admin.conf file..."
 if [ "$installer_type" == "compass" ]; then
+    info "Fetching admin.conf file on Compass"
     sudo docker cp compass-tasks:/opt/admin.conf $dest_path &> /dev/null
     sudo chown $(whoami):$(whoami) $dest_path
     info "Fetch admin.conf successfully"
+elif [ "$installer_type" == "joid" ]; then
+    info "Do nothing, config file has been provided in $HOME/joid_config/config for joid"
 else
-    error "Installer $installer is not supported by this script"
+    error "Installer $installer_type is not supported by this script"
 fi
 
index f7c6769..0647d32 100755 (executable)
 #Monit setup script for opnfv jnlp slave connections
 
 test_firewall() {
-    echo "testing that the firewall is open for us at build.opnfv.org"
-    test=$(echo "blah"| nc -w 4 build.opnfv.org 57387 > /dev/null 2>&1; echo $?)
+jenkins_hostname="${jenkins_hostname:-build.opnfv.org}"
+
+
+    echo "testing that the firewall is open for us at $jenkins_hostname"
+    test=$(echo "blah"| nc -w 4 $jenkins_hostname 57387 > /dev/null 2>&1; echo $?)
     if [[ $test == 0 ]]; then
-        echo "Firewall is open for us at build.opnfv.org"
+        echo "Firewall is open for us at $jenkins_hostname"
         exit 0
     else
         cat << EOF
@@ -84,8 +87,14 @@ main () {
 
         if [ -d /etc/monit/conf.d ]; then
             monitconfdir="/etc/monit/conf.d/"
+            monitconfig="/etc/monit/monitrc"
+            #add start delay
+            sed -i '/^#.* delay /s/^#//' "$monitconfig"
         elif [ -d /etc/monit.d ]; then
             monitconfdir="/etc/monit.d"
+            monitconfig="/etc/monitrc"
+            #add start delay
+            sed -i '/^#.* delay /s/^#//' "$monitconfig"
         else
             echo "Could not determine the location of the monit configuration file."
             echo "Make sure monit is installed."
@@ -103,7 +112,7 @@ if does not exist then exec "$mkdir -p /var/run/$jenkinsuser"
 if failed uid $jenkinsuser then exec "$chown $jenkinsuser /var/run/$jenkinsuser"
 if failed gid $jenkinsuser then exec "$chown :$jenkinsuser /var/run/$jenkinsuser"
 
-check process jenkins with pidfile /var/run/$jenkinsuser/jenkins_jnlp_pid every 2 cycles
+check process jenkins with pidfile /var/run/$jenkinsuser/jenkins_jnlp_pid
 start program = "/usr/bin/sudo -u $jenkinsuser /bin/bash -c 'cd $jenkinshome; export started_monit=true; $0 $@' with timeout 60 seconds"
 stop program = "/bin/bash -c '/bin/kill \$(/bin/cat /var/run/$jenkinsuser/jenkins_jnlp_pid)'"
 depends on jenkins_piddir
@@ -118,7 +127,7 @@ if does not exist then exec \"$mkdir -p /var/run/$jenkinsuser\"
 if failed uid $jenkinsuser then exec \"$chown $jenkinsuser /var/run/$jenkinsuser\"
 if failed gid $jenkinsuser then exec \"$chown :$jenkinsuser /var/run/$jenkinsuser\"
 
-check process jenkins with pidfile /var/run/$jenkinsuser/jenkins_jnlp_pid every 2 cycles
+check process jenkins with pidfile /var/run/$jenkinsuser/jenkins_jnlp_pid
 start program = \"/usr/bin/sudo -u $jenkinsuser /bin/bash -c 'cd $jenkinshome; export started_monit=true; $0 $@' with timeout 60 seconds\"
 stop program = \"/bin/bash -c '/bin/kill \$(/bin/cat /var/run/$jenkinsuser/jenkins_jnlp_pid)'\"
 depends on jenkins_piddir\
@@ -132,7 +141,7 @@ depends on jenkins_piddir\
     fi
 
     if [[ $started_monit == "true" ]]; then
-        wget --timestamping https://build.opnfv.org/ci/jnlpJars/slave.jar && true
+        wget --timestamping https://"$jenkins_hostname"/jnlpJars/slave.jar && true
         chown $jenkinsuser:$jenkinsuser slave.jar
 
         if [[ -f /var/run/$jenkinsuser/jenkins_jnlp_pid ]]; then
@@ -176,6 +185,7 @@ usage: $0 [OPTIONS]
  -u  set jenkins user
  -n  set slave name
  -s  set secret key
+ -l  set host, default is build.opnfv.org/ci
  -t  test the connection string by connecting without monit
  -f  test firewall
 
@@ -190,13 +200,14 @@ if [[ -z "$@" ]]; then
     usage
 fi
 
-while getopts "j:u:n:s:htf" OPTION
+while getopts "j:u:n:s:l:htf" OPTION
 do
     case $OPTION in
         j ) jenkinshome="$OPTARG" ;;
         u ) jenkinsuser="$OPTARG" ;;
         n ) slave_name="$OPTARG" ;;
         s ) slave_secret="$OPTARG";;
+        l ) jenkins_hostname="$OPTARG" ;;
         h ) usage ;;
         t ) started_monit=true
             skip_monit=true
@@ -206,6 +217,6 @@ do
     esac
 done
 
-connectionstring="java -jar slave.jar -jnlpUrl https://build.opnfv.org/ci/computer/"$slave_name"/slave-agent.jnlp -secret "$slave_secret" -noCertificateCheck "
-
+jenkins_hostname="${jenkins_hostname:-build.opnfv.org/ci}"
+connectionstring="java -jar slave.jar -jnlpUrl https://"$jenkins_hostname"/computer/"$slave_name"/slave-agent.jnlp -secret "$slave_secret" -noCertificateCheck "
 main "$@"