Merge "Allow ZTE POD2 to Publish Testing Logs"
authorMorgan Richomme <morgan.richomme@orange.com>
Tue, 8 Aug 2017 14:34:31 +0000 (14:34 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 8 Aug 2017 14:34:31 +0000 (14:34 +0000)
25 files changed:
jjb/apex/apex.yml
jjb/apex/apex.yml.j2
jjb/apex/update-build-result.groovy
jjb/bottlenecks/bottlenecks-ci-jobs.yml
jjb/bottlenecks/bottlenecks-run-suite.sh
jjb/ci_gate_security/anteater-report-to-gerrit.sh
jjb/ci_gate_security/anteater-security-audit.sh
jjb/ci_gate_security/opnfv-ci-gate-security.yml
jjb/compass4nfv/compass-ci-jobs.yml
jjb/compass4nfv/compass-verify-jobs.yml
jjb/doctor/doctor.yml
jjb/dovetail/dovetail-ci-jobs.yml
jjb/global/releng-macros.yml
jjb/global/slave-params.yml
jjb/joid/joid-daily-jobs.yml
jjb/qtip/qtip-integration-jobs.yml [new file with mode: 0644]
utils/test/testapi/docker/prepare-env.sh
utils/test/testapi/etc/config.ini
utils/test/testapi/opnfv_testapi/cmd/server.py
utils/test/testapi/opnfv_testapi/tests/unit/common/noparam.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/normal.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/nosection.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/notboolean.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/notint.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/test_config.py

index 98a19d4..d4ae54f 100644 (file)
                   abort-all-job: true
                   git-revision: false
 
+    publishers:
+        - groovy-postbuild:
+            script:
+                !include-raw-escape: ./update-build-result.groovy
 
 # Baremetal test job
 - job-template:
                   enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/"
                   abort-all-job: false
                   git-revision: false
-        - conditional-step:
-            condition-kind: current-status
-            condition-worst: SUCCESS
-            condtion-best: SUCCESS
-            on-evaluation-failure: mark-unstable
-            steps:
-                - shell: 'echo "Tests Passed"'
 # Build status is always success due conditional plugin prefetching
 # build status before multijob phases execute
 #        - conditional-step:
 #            steps:
 #                - shell: 'echo "Tests Passed"'
 
-    publishers:
-        - groovy-postbuild:
-            script:
-                !include-raw-escape: ./update-build-result.groovy
-
 
 # danube Daily
 - job-template:
index a3cc9c6..5d7f150 100644 (file)
                   abort-all-job: true
                   git-revision: false
 
+    publishers:
+        - groovy-postbuild:
+            script:
+                !include-raw-escape: ./update-build-result.groovy
 
 # Baremetal test job
 - job-template:
                   enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/"
                   abort-all-job: false
                   git-revision: false
-        - conditional-step:
-            condition-kind: current-status
-            condition-worst: SUCCESS
-            condtion-best: SUCCESS
-            on-evaluation-failure: mark-unstable
-            steps:
-                - shell: 'echo "Tests Passed"'
 # Build status is always success due conditional plugin prefetching
 # build status before multijob phases execute
 #        - conditional-step:
 #            steps:
 #                - shell: 'echo "Tests Passed"'
 
-    publishers:
-        - groovy-postbuild:
-            script:
-                !include-raw-escape: ./update-build-result.groovy
-
 {% for stream in scenarios %}
 # {{ stream }} Daily
 - job-template:
index a569e51..9edca6b 100644 (file)
@@ -1,4 +1,5 @@
 import hudson.model.*
-if (manager.build.@result == hudson.model.Result.FAILURE) {
+if (manager.logContains('^.*apex-deploy-baremetal.*SUCCESS$')
+      && manager.build.@result == hudson.model.Result.FAILURE) {
     manager.build.@result = hudson.model.Result.UNSTABLE
 }
index 455fa72..c61c245 100644 (file)
     pod:
 #compass CI PODs
         - baremetal:
-            slave-label: compass-baremetal
+            slave-label: compass-baremetal-master
             installer: compass
             auto-trigger-name: 'daily-trigger-disabled'
             <<: *master
         - virtual:
-            slave-label: compass-virtual
+            slave-label: compass-virtual-master
             installer: compass
             auto-trigger-name: 'daily-trigger-disabled'
             <<: *master
         - baremetal:
-            slave-label: compass-baremetal
+            slave-label: compass-baremetal-branch
             installer: compass
             auto-trigger-name: 'daily-trigger-disabled'
             <<: *danube
         - virtual:
-            slave-label: compass-virtual
+            slave-label: compass-virtual-branch
             installer: compass
             auto-trigger-name: 'daily-trigger-disabled'
             <<: *danube
 ####################
 
 - parameter:
-    name: 'bottlenecks-params-compass-baremetal'
+    name: 'bottlenecks-params-compass-baremetal-master'
     parameters:
         - string:
             name: BOTTLENECKS_DB_TARGET
-            default: '104.197.68.199:8086'
+            default: 'http://testresults.opnfv.org/test/api/v1/results'
             description: 'Arguments to use in order to choose the backend DB'
 
 - parameter:
-    name: 'bottlenecks-params-compass-virtual'
+    name: 'bottlenecks-params-compass-virtual-master'
     parameters:
         - string:
             name: BOTTLENECKS_DB_TARGET
-            default: ''
+            default: 'http://testresults.opnfv.org/test/api/v1/results'
             description: 'Arguments to use in order to choose the backend DB'
 
 - parameter:
-    name: 'bottlenecks-params-orange-pod2'
+    name: 'bottlenecks-params-compass-baremetal-branch'
     parameters:
         - string:
             name: BOTTLENECKS_DB_TARGET
-            default: '104.197.68.199:8086'
+            default: 'http://testresults.opnfv.org/test/api/v1/results'
+            description: 'Arguments to use in order to choose the backend DB'
+
+- parameter:
+    name: 'bottlenecks-params-compass-virtual-branch'
+    parameters:
+        - string:
+            name: BOTTLENECKS_DB_TARGET
+            default: 'http://testresults.opnfv.org/test/api/v1/results'
             description: 'Arguments to use in order to choose the backend DB'
index b81f4ca..6bab0e4 100644 (file)
@@ -53,18 +53,27 @@ if [[ $SUITE_NAME == *posca* ]]; then
     docker pull opnfv/bottlenecks:${DOCKER_TAG} >$redirect
 
     opts="--privileged=true -id"
+    envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
+          -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \
+          -e BRANCH=${BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \
+          -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL} \
+          -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
     docker_volume="-v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp"
 
-    cmd="docker run ${opts} --name bottlenecks-load-master ${docker_volume} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash"
+    cmd="docker run ${opts} ${envs} --name bottlenecks-load-master ${docker_volume} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash"
     echo "BOTTLENECKS INFO: running docker run commond: ${cmd}"
     ${cmd} >$redirect
     sleep 5
 
     if [[ $SUITE_NAME == posca_stress_traffic ]]; then
         TEST_CASE=posca_factor_system_bandwidth
-        docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT
+        testcase_cmd="docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT"
+        echo "BOTTLENECKS INFO: running test case ${TEST_CASE} with report indicator: ${testcase_cmd}"
+        ${testcase_cmd} >$redirect
     elif [[ $SUITE_NAME == posca_stress_ping ]]; then
         TEST_CASE=posca_factor_ping
-        docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT
+        testcase_cmd="docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT"
+        echo "BOTTLENECKS INFO: running test case ${TEST_CASE} with report indicator: ${testcase_cmd}"
+        ${testcase_cmd} >$redirect
     fi
 fi
index fc3018f..00a78ce 100644 (file)
@@ -12,14 +12,14 @@ if [[ -e securityaudit.log ]] ; then
     if grep ERROR securityaudit.log; then
         EXITSTATUS=1
     fi
-    
-    cat securityaudit.log  | awk -F"ERROR - " '{print $2}' > shortlog
-    
+
+    cat securityaudit.log  | awk -F"ERROR - " '{print $2}' | sed -e "s/\"/\\\\\"/g;s/\'/\\\\\'/g"> shortlog
+
     ssh -p 29418 gerrit.opnfv.org \
         "gerrit review -p $GERRIT_PROJECT \
         -m \"$(cat shortlog)\" \
         $GERRIT_PATCHSET_REVISION \
         --notify NONE"
-    
+
     exit $EXITSTATUS
 fi
index 9bd3cc3..35f9354 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/bash
 cd $WORKSPACE
+REPORTDIR='.reports'
+mkdir -p $REPORTDIR
 echo "Generating patchset file to list changed files"
 git diff HEAD^1 --name-only | sed "s#^#/home/opnfv/anteater/$PROJECT/#" > $WORKSPACE/patchset
 echo "Changed files are"
@@ -7,7 +9,7 @@ echo "--------------------------------------------------------"
 cat $WORKSPACE/patchset
 echo "--------------------------------------------------------"
 
-vols="-v $WORKSPACE:/home/opnfv/anteater/$PROJECT"
+vols="-v $WORKSPACE:/home/opnfv/anteater/$PROJECT -v $WORKSPACE/$REPORTDIR:/home/opnfv/anteater/$REPORTDIR"
 envs="-e PROJECT=$PROJECT"
 
 echo "Pulling releng-anteater docker image"
index d991573..55d629c 100644 (file)
     builders:
         - anteater-security-audit
         - report-security-audit-result-to-gerrit
+    publishers:
+      - archive-artifacts:
+          artifacts: ".reports/*"
+
 ########################
 # builder macros
 ########################
index c98fd36..4c12f19 100644 (file)
 - trigger:
     name: 'compass-os-odl_l2-nofeature-ha-baremetal-centos-master-trigger'
     triggers:
-        - timed: '0 23 * * *'
+        - timed: ''
 - trigger:
     name: 'compass-os-odl_l3-nofeature-ha-baremetal-centos-master-trigger'
     triggers:
 - trigger:
     name: 'compass-os-odl_l2-nofeature-ha-baremetal-master-trigger'
     triggers:
-        - timed: '0 22 * * *'
+        - timed: ''
 - trigger:
     name: 'compass-os-odl_l3-nofeature-ha-baremetal-master-trigger'
     triggers:
 - trigger:
     name: 'compass-os-odl_l2-nofeature-ha-virtual-master-trigger'
     triggers:
-        - timed: '0 20 * * *'
+        - timed: ''
 - trigger:
     name: 'compass-os-odl_l3-nofeature-ha-virtual-master-trigger'
     triggers:
index f016b91..ee91e02 100644 (file)
             projects:
                 - name: 'functest-compass-virtual-suite-{stream}'
                   current-parameters: false
-                  predefined-parameters:
+                  predefined-parameters: |
                     FUNCTEST_SUITE_NAME=healthcheck
+                    DEPLOY_SCENARIO=os-nosdn-nofeature-ha
                   node-parameters: true
                   kill-phase-on: NEVER
                   abort-all-job: true
                 - name: 'functest-compass-virtual-suite-{stream}'
                   current-parameters: false
-                  predefined-parameters:
+                  predefined-parameters: |
                     FUNCTEST_SUITE_NAME=vping_ssh
+                    DEPLOY_SCENARIO=os-nosdn-nofeature-ha
                   node-parameters: true
                   kill-phase-on: NEVER
                   abort-all-job: true
index c6b2cb6..a307b18 100644 (file)
         - '{auto-trigger-name}':
             project: '{project}'
             branch: '{branch}'
+            files: 'tests/**'
 
     builders:
         - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
         - '{auto-trigger-name}':
             project: '{project}'
             branch: '{branch}'
+            files: 'tests/**'
 
     builders:
         - 'clean-workspace-log'
                     branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: ANT
-                    pattern: 'tests/**'
+                    pattern: '{files}'
             skip-vote:
                 successful: true
                 failed: true
index bcda2b7..fd3b912 100644 (file)
@@ -25,7 +25,7 @@
         branch: 'stable/{stream}'
         dovetail-branch: master
         gs-pathname: '/{stream}'
-        docker-tag: 'cvp.0.3.0'
+        docker-tag: 'cvp.0.4.0'
 
 #-----------------------------------
 # POD, PLATFORM, AND BRANCH MAPPING
index 92199d6..89a3802 100644 (file)
                         branch-pattern: '**/{branch}'
                   file-paths:
                       - compare-type: 'ANT'
-                        pattern: 'tests/**'
+                        pattern: '{files}'
             skip-vote:
                 successful: true
                 failed: true
index 7a257f1..375468f 100644 (file)
             name: BRIDGE
             default: 'br0'
             description: 'pxe bridge for booting of Fuel master'
+- parameter:
+    name: zte-pod4-defaults
+    parameters:
+        - node:
+            name: SLAVE_NAME
+            description: 'Slave name on Jenkins'
+            allowed-slaves:
+                - zte-pod4
+            default-slaves:
+                - zte-pod4
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: 'Git URL to use on this Jenkins Slave'
 - parameter:
     name: 'juniper-pod1-defaults'
     parameters:
index 1ff260a..1c7b8cd 100644 (file)
@@ -70,6 +70,8 @@
             auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
         - 'k8-ovn-lb-noha':
             auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
+        - 'os-nosdn-openbaton-ha':
+            auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
 
     jobs:
         - 'joid-{scenario}-{pod}-daily-{stream}'
     name: 'joid-k8-ovn-lb-noha-cengn-pod1-master-trigger'
     triggers:
         - timed: ''
+
+# os-nosdn-openbaton-ha trigger - branch: master
+- trigger:
+    name: 'joid-os-nosdn-openbaton-ha-baremetal-master-trigger'
+    triggers:
+        - timed: '5 25 * * *'
+- trigger:
+    name: 'joid-os-nosdn-openbaton-ha-virtual-master-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'joid-os-nosdn-openbaton-ha-orange-pod1-master-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'joid-os-nosdn-openbaton-ha-cengn-pod1-master-trigger'
+    triggers:
+        - timed: ''
diff --git a/jjb/qtip/qtip-integration-jobs.yml b/jjb/qtip/qtip-integration-jobs.yml
new file mode 100644 (file)
index 0000000..a349fc3
--- /dev/null
@@ -0,0 +1,48 @@
+######################
+# verify before MERGE
+######################
+
+- project:
+    name: qtip-integration-jobs
+    project: qtip
+    jobs:
+        - 'qtip-storage-{stream}'
+    stream:
+        - master:
+            branch: '{stream}'
+            gs-pathname: ''
+            disabled: false
+
+################################
+## job templates
+#################################
+
+- job-template:
+    name: 'qtip-storage-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+            branch: '{branch}'
+        # Pin the tests on zte-pod4 with apex deployment
+        - apex-defaults
+        - zte-pod4-defaults
+    scm:
+        - git-scm-gerrit
+
+    triggers:
+        - experimental:
+            project: {project}
+            branch: {branch}
+            files: '**'
+
+    builders:
+        - shell: |
+             #!/bin/bash
+                set -o errexit
+                set -o pipefail
+                set -o xtrace
+
+                source integration/storperf/storperf.sh
index 4f1be7d..b14bc24 100755 (executable)
@@ -8,7 +8,6 @@ fi
 
 if [ "$base_url" != "" ]; then
     sudo crudini --set --existing $FILE api url $base_url/api/v1
-    sudo crudini --set --existing $FILE swagger base_url $base_url
     sudo crudini --set --existing $FILE ui url $base_url
     sudo echo "{\"testapiApiUrl\": \"$base_url/api/v1\"}" > \
         /usr/local/lib/python2.7/dist-packages/opnfv_testapi/static/testapi-ui/config.json
index 435188d..1ec899f 100644 (file)
@@ -18,9 +18,6 @@ results_per_page = 20
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
-
 [ui]
 url = http://localhost:8000
 
index a5ac5eb..50ac049 100644 (file)
@@ -37,7 +37,7 @@ from opnfv_testapi.tornado_swagger import swagger
 
 
 def make_app():
-    swagger.docs(base_url=CONF.swagger_base_url,
+    swagger.docs(base_url=CONF.ui_url,
                  static_path=CONF.static_path)
     return swagger.Application(
         url_mappings.mappings,
index fda2a09..be7f2b9 100644 (file)
@@ -12,5 +12,5 @@ port = 8000
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index 77cc6c6..c81c6c5 100644 (file)
@@ -13,5 +13,5 @@ port = 8000
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index 9988fc0..a9ed49c 100644 (file)
@@ -7,5 +7,5 @@ port = 8000
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index b3f3276..3a11f9d 100644 (file)
@@ -13,5 +13,5 @@ port = 8000
 debug = True
 authenticate = notboolean
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index d1b752a..8180719 100644 (file)
@@ -13,5 +13,5 @@ port = notint
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index cc8743c..8cfc513 100644 (file)
@@ -12,4 +12,4 @@ def test_config_normal(mocker, config_normal):
     assert CONF.api_port == 8000
     assert CONF.api_debug is True
     assert CONF.api_authenticate is False
-    assert CONF.swagger_base_url == 'http://localhost:8000'
+    assert CONF.ui_url == 'http://localhost:8000'