Merge "adding testing builder"
authorTim Rozet <trozet@redhat.com>
Wed, 15 Jun 2016 19:13:54 +0000 (19:13 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Wed, 15 Jun 2016 19:13:55 +0000 (19:13 +0000)
42 files changed:
docs/how-to-use-docs/documentation-example.rst [deleted file]
docs/how-to-use-docs/index.rst [deleted file]
jjb/apex/apex-deploy.sh
jjb/armband/armband-project-jobs.yml
jjb/availability/availability.yml
jjb/bottlenecks/bottlenecks-project-jobs.yml
jjb/compass4nfv/compass-ci-jobs.yml
jjb/conductor/conductor.yml
jjb/copper/copper.yml
jjb/doctor/doctor.yml
jjb/dpacc/dpacc.yml
jjb/fastpathmetrics/fastpathmetrics.yml
jjb/fuel/fuel-build.sh
jjb/fuel/fuel-ci-jobs.yml
jjb/functest/functest-project-jobs.yml
jjb/functest/set-functest-env.sh
jjb/ipv6/ipv6.yml
jjb/joid/joid-ci-jobs.yml
jjb/joid/joid-project-jobs.yml
jjb/octopus/octopus.yml
jjb/onosfw/onosfw.yml
jjb/opnfv/installer-params.yml
jjb/opnfv/slave-params.yml
jjb/ovsnfv/ovsnfv.yml
jjb/parser/parser.yml
jjb/pharos/pharos.yml
jjb/prediction/prediction.yml
jjb/promise/promise.yml
jjb/qtip/qtip-ci-jobs.yml
jjb/qtip/qtip-project-jobs.yml
jjb/storperf/storperf.yml
jjb/vswitchperf/vswitchperf.yml
utils/fetch_os_creds.sh
utils/test/reporting/functest/reporting-tempest.py
utils/test/reporting/functest/reporting-vims.py
utils/test/reporting/functest/reportingConf.py
utils/test/reporting/functest/reportingUtils.py
utils/test/result_collection_api/opnfv_testapi/resources/handlers.py
utils/test/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py
utils/test/result_collection_api/opnfv_testapi/tests/unit/test_fake_pymongo.py
utils/test/result_collection_api/opnfv_testapi/tests/unit/test_result.py
utils/test/result_collection_api/opnfv_testapi/tests/unit/test_testcase.py

diff --git a/docs/how-to-use-docs/documentation-example.rst b/docs/how-to-use-docs/documentation-example.rst
deleted file mode 100644 (file)
index 5e2a8fb..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-==================================================
-How to create documentation for your OPNFV project
-==================================================
-
-Directory Structure
-===================
-
-This is the directory structure of the docs/ directory which have to be placed
-in the root of your project directory.
-
-.. code-block:: bash
-
-    ./how-to-use-docs/documentation-example.rst
-    ./how-to-use-docs/index.rst
-
-To create your own document, create any number of directories (depending
-on your need, e.g. manual) under the docs/ and place an index.rst in each
-directories.
-The depth of all directory should be one, so that you can make sure that
-all directory names are unique. If you want to have set of all documents in
-your repo, create new ``docs/all/index.rst`` and list document links in OPNFV
-artifact server (artifact.opnfv.org) instead of including all other rst files
-or having ``docs/index.rst``, in order to avoid having duplicated contents in
-your documents.
-
-Note:
-You may have "docs/how-to-use-docs/" in you project repo. You can delete it,
-since it is sample and master version is stored in releng repo.
-
-Note:
-During the document build process, 'docs_build' and 'docs_output' will be
-created in the project root directory. To avoid conflict, you should not
-use those names and should add the following entries in '.gitignore' file
-so that git can ignore built files.
-
-.. code-block:: bash
-
-    /docs_build/
-    /docs_output/
-    /releng/
-
-Index File
-==========
-
-This index file must refence your other rst files in that directory.
-
-Here is an example index.rst :
-
-.. code-block:: bash
-
-    *******************
-    Documentation Title
-    *******************
-
-    .. toctree::
-       :numbered:
-       :maxdepth: 2
-
-       documentation-example.rst
-
-Source Files
-============
-
-Document source files have to be written in reStructuredText format (rst).
-Each file would be build as an html page and a chapter in PDF.
-
-Here is an example source rst file :
-
-.. code-block:: bash
-
-    =============
-    Chapter Title
-    =============
-
-    Section Title
-    =============
-
-    Hello!
-
-Writing RST Markdown
-====================
-
-See http://sphinx-doc.org/rest.html .
-
-**Hint:**
-Table and its contents won't be adjusted, so you may need to fix your source
-text when your table is truncated in PDF version. Or, you can use 'longtable'
-option that splits your table vertically (by rows) in multiple pages.
-It is useful if you have trouble in rendering table containing many rows.
-
-.. code-block:: bash
-
-    .. table::
-        :class: longtable
-
-        +------------------------+------------+----------+----------+
-        | Header row, column 1   | Header 2   | Header 3 | Header 4 |
-        +========================+============+==========+==========+
-        | body row 1, column 1   | column 2   | column 3 | column 4 |
-        +------------------------+------------+----------+----------+
-        | body row 2             | ...        | ...      |          |
-        +------------------------+------------+----------+----------+
-
-**Hint:**
-You can add dedicated contents by using 'only' directive with build type
-('html' and 'pdf') for OPNFV document. But, this is not encouraged to use
-since this may make different views in HTML and PDF version.
-
-.. code-block:: bash
-
-    .. only:: html
-        This line will be shown only in html version.
-
-Configuration
-=============
-
-If you need to change the default configuration for document build, create
-new conf.py in the document directory (e.g. 'docs/how-to-use-docs/conf.py')
-that will be used in build process instead of default for OPNFV document
-build. The OPNFV default configuration can be found in releng repo
-(see `docs/etc/conf.py`_).
-
-.. _docs/etc/conf.py:
-    https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=blob;f=docs/etc/conf.py;
-
-In the build process, the following parameters are automatically added if they
-are not set in the conf.py .
-
-* **release**, **version** : ``git last tag name`` (``git last commit hash``)
-* **project** : ``git repo name``
-* **copyright** : ``year``, OPNFV
-* **latex_documents** (set of pdf configuration) :
-  [('index', '``document directory name``.tex',
-  '``document title in index.rst``', 'OPNFV', 'manual'),]
-
-See http://sphinx-doc.org/config.html to learn sphinx configuration.
-
-**Note:**
-You can leave the file path for OPNFV logo image which will be prepared
-before each document build.
-
-**Hint:**
-In PDF, figures will be floated to get better view. If you want to avoid such
-automated fixes, just add this option to your conf.py after copying the default
-configuration in to the document directory.
-
-.. code-block:: bash
-
-    latex_elements = {'figure_align': 'H'}
-
-Versioning
-==========
-
-The relevant release and version information will be added to your documents
-by using tags from your project's git repository.
-The tags will be applied by Releng Project.
-
-Testing
-=======
-
-You can test document build in your laptop by using build script which is
-also used in document build jobs below:
-
-.. code-block:: bash
-
-    $ cd /local/repo/path/to/project
-    $ git clone https://git.opnfv.org/releng
-    $ ./releng/utils/docs-build.sh
-
-Then, you can see the docs in 'docs_output' directory if build succeeded.
-
-If you have a problem of missing python package, you can make sure all
-necessary packages are installed as follows:
-
-.. code-block:: bash
-
-    $ sudo pip install Sphinx==1.3.1 doc8 sphinxcontrib-httpdomain
-
-Note:
-Developers are encouraged to use "ssh://<username>@gerrit.opnfv.org:29418/releng"
-instead of "https://git.opnfv.org/releng", so that you can quickly start
-development in releng.
-See https://wiki.opnfv.org/developer/getting_started for more detail.
-
-
-Jenkins Jobs
-============
-
-Enabling Jenkins Jobs
----------------------
-
-Jenkins in OPNFV infra performs the jobs to verify and update your documents.
-To make your project repository watched by Jenkins to execute those jobs, you
-have to add your project name in 'project-pattern' of the following jobs by
-sending patch to update `jjb/opnfv/opnfv-docs.yml`_ on gerrit.
-
-.. _jjb/opnfv/opnfv-docs.yml:
-    https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=blob;f=jjb/opnfv/opnfv-docs.yml;
-
-Verify Job
-----------
-
-The verify job name is **opnfv-docs-verify**.
-
-When you send document changes to gerrit, jenkins will create your documents
-in HTML and PDF formats to verify that new document can be built successfully.
-Please check the jenkins log and artifact carefully.
-You can improve your document even though if the build job succeeded.
-
-Documents will be uploaded to
-``http://artifacts.opnfv.org/review/<Change Number>/`` for review.
-Those documents will be replaced if you update the change by sending new
-patch set to gerrit, and deleted after the change is merged.
-Document link(s) can be found in your change page on gerrit as a review
-comment.
-
-Note:
-Currently, the job reports 'SUCCESS' as result of document build even if the
-PDF creation failed. This is a provisional workaround, since many projects are
-not ready for PDF creation yet.
-
-Merge Job
-----------
-
-The merge job name is **opnfv-docs-merge**.
-
-Once you are happy with the look of your documentation, you can submit the
-change. Then, the merge job will upload latest build documents to
-``http://artifacts.opnfv.org/<Project Name>/docs/`` .
-You can put links in your project wiki page, so that everyone can see the
-latest document always.
-
-Sphinx Extensions
-=================
-
-You can see available sphinx extension(s) in `docs/etc/requirements.txt`_.
-
-.. _docs/etc/requirements.txt:
-    https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=blob;f=docs/etc/requirements.txt;
-
-You can use other sphinx extensions to improve your documents.
-To share such tips, we encourage you to enable the extension in OPNFV infra
-by asking releng and opnfvdocs teams to add new sphinx extension via gerrit
-(proposing change in `docs/etc/conf.py`_ and `docs/etc/requirements.txt`_).
-After quick sanity checks, we'll install python package (if needed) and make
-it available in OPNFV document build.
diff --git a/docs/how-to-use-docs/index.rst b/docs/how-to-use-docs/index.rst
deleted file mode 100644 (file)
index 8e4dbd2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-..
-    This is new template created on Nov 27, 2015.
-
-*********************
-Example Documentation
-*********************
-
-.. toctree::
-   :numbered:
-   :maxdepth: 2
-
-   documentation-example.rst
index 47ec572..b0ff7bd 100755 (executable)
@@ -95,6 +95,10 @@ if [[ "$BUILD_DIRECTORY" == *verify* ]]; then
       fi
     done
 
+    # Make sure ipxe-roms-qemu package is updated to latest.
+    # This package is needed for multi virtio nic PXE boot in virtual environment.
+    sudo yum update -y ipxe-roms-qemu
+
     if [ -z ${PYTHONPATH:-} ]; then
         export PYTHONPATH=${WORKSPACE}/lib/python
     else
index b40949d..aa089e0 100644 (file)
@@ -27,7 +27,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index a320ff7..0d887e7 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index 7dbaeae..a28e2a4 100644 (file)
@@ -40,7 +40,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
@@ -79,7 +79,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index 76c7574..2ef25a7 100644 (file)
     builders:
         - trigger-builds:
             - project: 'compass-deploy-{pod}-daily-{stream}'
-              current-parameters: false
+              current-parameters: true
               predefined-parameters: |
                 DEPLOY_SCENARIO={scenario}
                 COMPASS_OS_VERSION={os-version}
index b2c4b1f..247f4f2 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index 1b16864..8aad3f2 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index b2cbb02..cf9f643 100644 (file)
@@ -22,7 +22,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index 0258c23..9d788ba 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index c9699ad..e7dbf26 100644 (file)
@@ -28,7 +28,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
@@ -83,7 +83,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
             choosing-strategy: 'default'
 
     triggers:
-        - gerrit:
-            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}'
-                forbidden-file-paths:
-                  - compare-type: ANT
-                    pattern: 'docs/**'
+         - pollscm:
+             cron: '@midnight'
 
     builders:
         - shell: |
index 95ebaa5..a32e532 100755 (executable)
@@ -13,6 +13,9 @@ set -o pipefail
 
 cd $WORKSPACE
 
+# remove the expired items from cache
+./ci/clean_cache.sh $CACHE_DIRECTORY
+
 LATEST_ISO_PROPERTIES=$WORKSPACE/latest.iso.properties
 if [[ "$JOB_NAME" =~ "daily" ]]; then
     # check to see if we already have an artifact on artifacts.opnfv.org
index 9df7a64..bd51dc2 100644 (file)
 - trigger:
     name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-master-trigger'
     triggers:
-        - timed: '0 0 * * *'
+        - timed: ''
 - trigger:
     name: 'fuel-os-odl_l2-nofeature-ha-baremetal-daily-master-trigger'
     triggers:
-        - timed: '0 3 * * *'
+        - timed: ''
 - trigger:
     name: 'fuel-os-odl_l3-nofeature-ha-baremetal-daily-master-trigger'
     triggers:
-        - timed: '0 6 * * *'
+        - timed: ''
 - trigger:
     name: 'fuel-os-onos-nofeature-ha-baremetal-daily-master-trigger'
     triggers:
-        - timed: '0 9 * * *'
+        - timed: ''
 - trigger:
     name: 'fuel-os-odl_l2-bgpvpn-ha-baremetal-daily-master-trigger'
     triggers:
-        - timed: '0 12 * * *'
+        - timed: ''
 - trigger:
     name: 'fuel-os-odl_l2-sfc-ha-baremetal-daily-master-trigger'
     triggers:
-        - timed: '0 15 * * *'
+        - timed: ''
 - trigger:
     name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-master-trigger'
     triggers:
-        - timed: '0 18 * * *'
+        - timed: ''
 - trigger:
     name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-master-trigger'
     triggers:
-        - timed: '0 21 * * *'
+        - timed: ''
 - trigger:
     name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-master-trigger'
     triggers:
index 93a359b..7f86281 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index b3be3ab..aae6f76 100755 (executable)
@@ -17,6 +17,9 @@ if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
     fi
     INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
     sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
+    sudo scp root@${INSTALLER_IP}:/home/stack/stackrc .
+    stackrc="-v ./stackrc:/home/opnfv/functest/conf/stackrc"
+
     if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
         sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
     fi
@@ -45,7 +48,7 @@ test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(ca
 echo "Functest: Pulling image opnfv/functest:${DOCKER_TAG}"
 docker pull opnfv/functest:$DOCKER_TAG >/dev/null
 
-cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} ${custom_params} opnfv/functest:${DOCKER_TAG} /bin/bash"
+cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} ${custom_params} ${stackrc} opnfv/functest:${DOCKER_TAG} /bin/bash"
 echo "Functest: Running docker run command: ${cmd}"
 ${cmd} >${redirect}
 sleep 5
index 67bc788..5b96912 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index c861b92..b13b51f 100644 (file)
@@ -91,6 +91,7 @@
             use-build-blocker: true
             blocking-jobs:
                 - 'joid-os-.*?-{pod}-daily-{stream}'
+            block-level: 'NODE'
 
     wrappers:
         - build-name:
 - job-template:
     name: 'joid-deploy-{pod}-daily-{stream}'
 
-    concurrent: false
+    concurrent: true
 
     properties:
         - throttle:
             use-build-blocker: true
             blocking-jobs:
                 - 'joid-deploy-{pod}-daily-{stream}'
+            block-level: 'NODE'
 
     wrappers:
         - build-name:
index b314da1..d5a206b 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index cceda50..1cb71cc 100644 (file)
@@ -25,7 +25,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index 7dc0241..0335b71 100644 (file)
@@ -29,7 +29,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
@@ -68,7 +68,7 @@
     parameters:
         - project-parameter:
             project: '{project}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - git-scm:
@@ -91,7 +91,7 @@
     parameters:
         - project-parameter:
             project: '{project}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
         - string:
             name: GS_URL
             default: '$GS_BASE{gs-pathname}'
index 98a15de..f95d79f 100644 (file)
@@ -87,7 +87,7 @@
             description: "Reinstall MAAS and Bootstrap before deploy [true/false]"
         - string:
             name: UBUNTU_DISTRO
-            default: 'trusty'
+            default: 'xenial'
             description: "Ubuntu distribution to use for Openstack (trusty|xenial)"
         - string:
             name: CPU_ARCHITECTURE
index ee74914..da0808b 100644 (file)
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
             description: 'Git URL to use on this Jenkins Slave'
-
-- parameter:
-    name: 'opnfv-build-defaults'
-    parameters:
-        - label:
-            name: SLAVE_LABEL
-            default: 'opnfv-build'
-            description: 'Slave label on Jenkins'
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on this Jenkins Slave'
-        - string:
-            name: BUILD_DIRECTORY
-            default: $WORKSPACE/build_output
-            description: "Directory where the build artifact will be located upon the completion of the build."
-
-- parameter:
-    name: 'intel-build1-defaults'
-    parameters:
-        - node:
-            name: SLAVE_NAME
-            description: 'Slave name on Jenkins'
-            allowed-slaves:
-                - intel-build1
-            default-slaves:
-                - intel-build1
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on this Jenkins Slave'
-
-- parameter:
-    name: 'intel-build2-defaults'
-    parameters:
-        - node:
-            name: SLAVE_NAME
-            description: 'Slave name on Jenkins'
-            allowed-slaves:
-                - intel-build2
-            default-slaves:
-                - intel-build2
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on this Jenkins Slave'
-
-- parameter:
-    name: 'intel-build3-defaults'
-    parameters:
-        - node:
-            name: SLAVE_NAME
-            description: 'Slave name on Jenkins'
-            allowed-slaves:
-                - intel-build3
-            default-slaves:
-                - intel-build3
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on this Jenkins Slave'
-
 - parameter:
     name: 'zte-pod1-defaults'
     parameters:
             name: LAB_CONFIG_URL
             default: ssh://git@git.enea.com/pharos/lab-config
             description: 'Base URI to the configuration directory'
+- parameter:
+    name: 'opnfv-build-centos-defaults'
+    parameters:
+        - label:
+            name: SLAVE_LABEL
+            default: 'opnfv-build-centos'
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: 'Git URL to use on this Jenkins Slave'
+        - string:
+            name: BUILD_DIRECTORY
+            default: $WORKSPACE/build_output
+            description: "Directory where the build artifact will be located upon the completion of the build."
+- parameter:
+    name: 'opnfv-build-ubuntu-defaults'
+    parameters:
+        - label:
+            name: SLAVE_LABEL
+            default: 'opnfv-build-ubuntu'
+            description: 'Slave label on Jenkins'
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: 'Git URL to use on this Jenkins Slave'
+        - string:
+            name: BUILD_DIRECTORY
+            default: $WORKSPACE/build_output
+            description: "Directory where the build artifact will be located upon the completion of the build."
index dbe0a25..ec5761b 100644 (file)
         - master:
             branch: '{stream}'
             gs-pathname: ''
+            disabled: false
         - brahmaputra:
             branch: 'stable/{stream}'
             gs-pathname: '/{stream}'
+            disabled: true
 
 - job-template:
     name: 'ovsnfv-verify-{stream}'
@@ -24,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'intel-build2-defaults'
+        - 'opnfv-build-centos-defaults'
         - string:
             name: GS_URL
             default: '$GS_BASE{gs-pathname}'
@@ -71,7 +73,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'intel-build2-defaults'
+        - 'opnfv-build-centos-defaults'
         - string:
             name: GS_URL
             default: '$GS_BASE{gs-pathname}'
 - job-template:
     name: 'ovsnfv-daily-{stream}'
 
+    disabled: '{obj:disabled}'
+
     parameters:
         - project-parameter:
             project: '{project}'
-        - 'intel-build2-defaults'
+        - 'opnfv-build-centos-defaults'
         - string:
             name: GS_URL
             default: '$GS_BASE{gs-pathname}'
index 01f51aa..b8a40cc 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index 3bef225..98d7128 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index f8fdceb..b6471bf 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index 7999fb5..97a8b3e 100644 (file)
@@ -26,7 +26,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index ee321eb..6e9a20d 100644 (file)
             installer: joid
             <<: *master
             auto-trigger-name: 'daily-trigger-disabled'
-#      - zte-pod1:   #would be confirmed with the ZTE lab by tomorrow
-#            installer: fuel
-#            <<: *master
+        - zte-pod1:
+            installer: fuel
+            auto-trigger-name: 'qtip-daily-zte-pod1-trigger'
+            <<: *master
 
 #--------------------------------
     jobs:
 #   triggers:
 #       - timed : ' 0 0 * * *'
 
-
+- trigger:
+    name: 'qtip-daily-zte-pod1-trigger'
+    triggers:
+        - timed: '0 5 * * *'
index c77bac7..75f7511 100644 (file)
@@ -23,7 +23,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index 3b31bad..fb70df7 100644 (file)
@@ -19,7 +19,7 @@
 - job-template:
     name: 'storperf-verify-{stream}'
 
-    node: opnfv-build
+    node: opnfv-build-ubuntu
 
     parameters:
         - project-parameter:
 - job-template:
     name: 'storperf-merge-{stream}'
 
-    # builder-merge job to run JJB update
-    #
-    # This job's purpose is to update all the JJB
-
-    node: opnfv-build
+    node: opnfv-build-ubuntu
 
     parameters:
         - project-parameter:
     # Required Variables:
     #     stream:    branch with - in place of / (eg. stable)
     #     branch:    branch (eg. stable)
-    node: opnfv-build
+    node: opnfv-build-ubuntu
 
     disabled: true
 
index fe6ea49..0cf7f97 100644 (file)
@@ -65,7 +65,7 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - 'opnfv-build-defaults'
+        - 'opnfv-build-ubuntu-defaults'
 
     scm:
         - gerrit-trigger-scm:
index 88e6b4a..8f5aa08 100755 (executable)
@@ -82,7 +82,7 @@ if [ "$installer_type" == "fuel" ]; then
 
     # Check if controller is alive (online='True')
     controller_ip=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \
-        'fuel node | grep controller | grep True | awk "{print \$10}" | tail -1') &> /dev/null
+        'fuel node | grep controller | grep "True\|  1" | awk "{print \$10}" | tail -1') &> /dev/null
 
     if [ -z $controller_ip ]; then
         error "The controller $controller_ip is not up. Please check that the POD is correctly deployed."
index 70fb577..e9662d5 100644 (file)
@@ -7,10 +7,10 @@ installers = ["apex", "compass", "fuel", "joid"]
 items = ["tests", "Success rate", "duration"]
 
 PERIOD = 7
-
+print "Generate Tempest automatic reporting"
 for installer in installers:
     # we consider the Tempest results of the last PERIOD days
-    url = "http://testresults.opnfv.org/testapi/results?case=Tempest"
+    url = "http://testresults.opnfv.org/test/api/v1/results?case=Tempest"
     request = Request(url + '&period=' + str(PERIOD)
                       + '&installer=' + installer + '&version=master')
 
@@ -21,7 +21,7 @@ for installer in installers:
     except URLError, e:
         print 'No kittez. Got an error code:', e
 
-    test_results = results['test_results']
+    test_results = results['results']
     test_results.reverse()
 
     scenario_results = {}
@@ -41,7 +41,7 @@ for installer in installers:
         # For each scenario, we build a result object to deal with
         # results, criteria and error handling
         for result in scenario_results[s]:
-            result["creation_date"] = result["creation_date"].split(".")[0]
+            result["start_date"] = result["start_date"].split(".")[0]
 
             # retrieve results
             # ****************
@@ -96,5 +96,7 @@ for installer in installers:
                                  items=items,
                                  installer=installer)
 
-    with open("./release/index-tempest-" + installer + ".html", "wb") as fh:
+    with open("./release/master/index-tempest-" +
+              installer + ".html", "wb") as fh:
         fh.write(outputText)
+print "Tempest automatic reporting Done"
index 78ca9f5..5ba92d6 100644 (file)
@@ -24,7 +24,7 @@ installers = ["fuel", "compass", "joid", "apex"]
 step_order = ["initialisation", "orchestrator", "vIMS", "sig_test"]
 
 for installer in installers:
-    request = Request('http://testresults.opnfv.org/testapi/results?case=vIMS&installer=' + installer)
+    request = Request('http://testresults.opnfv.org/test/api/v1/results?case=vIMS&installer=' + installer)
 
     try:
         response = urlopen(request)
@@ -33,7 +33,7 @@ for installer in installers:
     except URLError, e:
         print 'No kittez. Got an error code:', e
 
-    test_results = results['test_results']
+    test_results = results['results']
     test_results.reverse()
 
     scenario_results = {}
@@ -45,7 +45,7 @@ for installer in installers:
     for s, s_result in scenario_results.items():
         scenario_results[s] = s_result[0:5]
         for result in scenario_results[s]:
-            result["creation_date"] = result["creation_date"].split(".")[0]
+            result["start_date"] = result["start_date"].split(".")[0]
             sig_test = result['details']['sig_test']['result']
             if not sig_test == "" and isinstance(sig_test, list):
                 format_result = sig_test_format(sig_test)
@@ -77,7 +77,7 @@ for installer in installers:
 
     outputText = template.render( scenario_results = scenario_results, step_order = step_order, installer = installer)
 
-    with open("./release/index-vims" + installer + ".html", "wb") as fh:
+    with open("./release/master/index-vims-" + installer + ".html", "wb") as fh:
         fh.write(outputText)
 
 
index e4c4548..e390a18 100644 (file)
@@ -11,7 +11,7 @@
 # ****************************************************
 installers = ["apex", "compass", "fuel", "joid"]
 # installers = ["compass"]
-versions = ["brahmaputra", "master"]
-versions = ["master"]
+versions = ["brahmaputra", "master"]
+versions = ["master"]
 PERIOD = 10
 MAX_SCENARIO_CRITERIA = 18
index f8d64aa..7170b83 100644 (file)
@@ -19,7 +19,7 @@ def getApiResults(case, installer, scenario, version):
     # urllib2.install_opener(opener)
     # url = "http://127.0.0.1:8000/results?case=" + case + \
     #       "&period=30&installer=" + installer
-    url = ("http://testresults.opnfv.org/testapi/results?case=" + case +
+    url = ("http://testresults.opnfv.org/test/api/v1/results?case=" + case +
            "&period=" + str(reportingConf.PERIOD) + "&installer=" + installer +
            "&scenario=" + scenario + "&version=" + version)
     request = Request(url)
@@ -37,7 +37,8 @@ def getApiResults(case, installer, scenario, version):
 def getScenarios(case, installer, version):
 
     case = case.getName()
-    url = ("http://testresults.opnfv.org/testapi/results?case=" + case +
+    print case
+    url = ("http://testresults.opnfv.org/test/api/v1/results?case=" + case +
            "&period=" + str(reportingConf.PERIOD) + "&installer=" + installer +
            "&version=" + version)
     request = Request(url)
@@ -46,11 +47,10 @@ def getScenarios(case, installer, version):
         response = urlopen(request)
         k = response.read()
         results = json.loads(k)
+        test_results = results['results']
     except URLError, e:
         print 'Got an error code:', e
 
-    test_results = results['test_results']
-
     if test_results is not None:
         test_results.reverse()
 
@@ -78,7 +78,7 @@ def getNbtestOk(results):
     for r in results:
         for k, v in r.iteritems():
             try:
-                if "passed" in v:
+                if "PASS" in v:
                     nb_test_ok += 1
             except:
                 print "Cannot retrieve test status"
@@ -90,7 +90,7 @@ def getResult(testCase, installer, scenario, version):
     # retrieve raw results
     results = getApiResults(testCase, installer, scenario, version)
     # let's concentrate on test results only
-    test_results = results['test_results']
+    test_results = results['results']
 
     # if results found, analyze them
     if test_results is not None:
@@ -106,7 +106,7 @@ def getResult(testCase, installer, scenario, version):
         for r in test_results:
             # print r["creation_date"]
             # print r["criteria"]
-            scenario_results.append({r["creation_date"]: r["criteria"]})
+            scenario_results.append({r["start_date"]: r["criteria"]})
         # sort results
         scenario_results.sort()
         # 4 levels for the results
index df920c4..8737011 100644 (file)
@@ -96,8 +96,10 @@ class GenericApiHandler(RequestHandler):
                 code, message = error(data)
                 raise HTTPError(code, message)
 
-        data.creation_date = datetime.now()
-        _id = yield self._eval_db(self.table, 'insert', data.format())
+        if self.table != 'results':
+            data.creation_date = datetime.now()
+        _id = yield self._eval_db(self.table, 'insert', data.format(),
+                                  check_keys=False)
         if 'name' in self.json_args:
             resource = data.name
         else:
@@ -173,7 +175,8 @@ class GenericApiHandler(RequestHandler):
         edit_request.update(self._update_requests(data))
 
         """ Updating the DB """
-        yield self._eval_db(self.table, 'update', query, edit_request)
+        yield self._eval_db(self.table, 'update', query, edit_request,
+                            check_keys=False)
         edit_request['_id'] = str(data._id)
         self.finish_request(edit_request)
 
@@ -214,8 +217,8 @@ class GenericApiHandler(RequestHandler):
             query[key] = new
         return equal, query
 
-    def _eval_db(self, table, method, *args):
-        return eval('self.db.%s.%s(*args)' % (table, method))
+    def _eval_db(self, table, method, *args, **kwargs):
+        return eval('self.db.%s.%s(*args, **kwargs)' % (table, method))
 
     def _eval_db_find_one(self, query, table=None):
         if table is None:
index ef9c719..6ab98c7 100644 (file)
@@ -80,11 +80,15 @@ class MemDb(object):
             return_one = True
             docs = [docs]
 
+        if check_keys:
+            for doc in docs:
+                self._check_keys(doc)
+
         ids = []
         for doc in docs:
             if '_id' not in doc:
                 doc['_id'] = str(ObjectId())
-            if not check_keys or not self._find_one(doc['_id']):
+            if not self._find_one(doc['_id']):
                 ids.append(doc['_id'])
                 self.contents.append(doc_or_docs)
 
@@ -131,8 +135,12 @@ class MemDb(object):
     def find(self, *args):
         return MemCursor(self._find(*args))
 
-    def _update(self, spec, document):
+    def _update(self, spec, document, check_keys=True):
         updated = False
+
+        if check_keys:
+            self._check_keys(document)
+
         for index in range(len(self.contents)):
             content = self.contents[index]
             if self._in(content, spec):
@@ -142,8 +150,8 @@ class MemDb(object):
             self.contents[index] = content
         return updated
 
-    def update(self, spec, document):
-        return thread_execute(self._update, spec, document)
+    def update(self, spec, document, check_keys=True):
+        return thread_execute(self._update, spec, document, check_keys)
 
     def _remove(self, spec_or_id=None):
         if spec_or_id is None:
@@ -163,6 +171,17 @@ class MemDb(object):
     def clear(self):
         self._remove()
 
+    def _check_keys(self, doc):
+        for key in doc.keys():
+            print('key', key, 'value', doc.get(key))
+            if '.' in key:
+                raise NameError('key {} must not contain .'.format(key))
+            if key.startswith('$'):
+                raise NameError('key {} must not start with $'.format(key))
+            if isinstance(doc.get(key), dict):
+                self._check_keys(doc.get(key))
+
+
 pods = MemDb()
 projects = MemDb()
 testcases = MemDb()
index 9bc311c..27382f0 100644 (file)
@@ -53,25 +53,70 @@ class MyTest(AsyncHTTPTestCase):
         user = yield self.db.pods.find_one({'_id': '1'})
         self.assertEqual(user.get('name', None), 'new_test1')
 
+    def test_update_dot_error(self):
+        self._update_assert({'_id': '1', 'name': {'1. name': 'test1'}},
+                            'key 1. name must not contain .')
+
+    def test_update_dot_no_error(self):
+        self._update_assert({'_id': '1', 'name': {'1. name': 'test1'}},
+                            None,
+                            check_keys=False)
+
+    def test_update_dollar_error(self):
+        self._update_assert({'_id': '1', 'name': {'$name': 'test1'}},
+                            'key $name must not start with $')
+
+    def test_update_dollar_no_error(self):
+        self._update_assert({'_id': '1', 'name': {'$name': 'test1'}},
+                            None,
+                            check_keys=False)
+
     @gen_test
     def test_remove(self):
         yield self.db.pods.remove({'_id': '1'})
         user = yield self.db.pods.find_one({'_id': '1'})
         self.assertIsNone(user)
 
-    @gen_test
-    def test_insert_check_keys(self):
-        yield self.db.pods.insert({'_id': '1', 'name': 'test1'},
-                                  check_keys=False)
-        cursor = self.db.pods.find({'_id': '1'})
-        names = []
-        while (yield cursor.fetch_next):
-            ob = cursor.next_object()
-            names.append(ob.get('name'))
-        self.assertItemsEqual(names, ['test1', 'test1'])
+    def test_insert_dot_error(self):
+        self._insert_assert({'_id': '1', '2. name': 'test1'},
+                            'key 2. name must not contain .')
+
+    def test_insert_dot_no_error(self):
+        self._insert_assert({'_id': '1', '2. name': 'test1'},
+                            None,
+                            check_keys=False)
+
+    def test_insert_dollar_error(self):
+        self._insert_assert({'_id': '1', '$name': 'test1'},
+                            'key $name must not start with $')
+
+    def test_insert_dollar_no_error(self):
+        self._insert_assert({'_id': '1', '$name': 'test1'},
+                            None,
+                            check_keys=False)
 
     def _clear(self):
         self.db.pods.clear()
 
+    def _update_assert(self, docs, error=None, **kwargs):
+        self._db_assert('update', error, {'_id': '1'}, docs, **kwargs)
+
+    def _insert_assert(self, docs, error=None, **kwargs):
+        self._db_assert('insert', error, docs, **kwargs)
+
+    @gen_test
+    def _db_assert(self, method, error, *args, **kwargs):
+        name_error = None
+        try:
+            yield self._eval_pods_db(method, *args, **kwargs)
+        except NameError as err:
+            name_error = err.args[0]
+        finally:
+            self.assertEqual(name_error, error)
+
+    def _eval_pods_db(self, method, *args, **kwargs):
+        return eval('self.db.pods.%s(*args, **kwargs)' % method)
+
+
 if __name__ == '__main__':
     unittest.main()
index dbc4431..bba3b22 100644 (file)
@@ -7,6 +7,7 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 import unittest
+import copy
 
 from opnfv_testapi.common.constants import HTTP_OK, HTTP_BAD_REQUEST, \
     HTTP_NOT_FOUND
@@ -161,6 +162,13 @@ class TestResultCreate(TestResultBase):
         self.assertEqual(code, HTTP_OK)
         self.assert_href(body)
 
+    def test_key_with_doc(self):
+        req = copy.deepcopy(self.req_d)
+        req.details = {'1.name': 'dot_name'}
+        (code, body) = self.create(req)
+        self.assertEqual(code, HTTP_OK)
+        self.assert_href(body)
+
 
 class TestResultGet(TestResultBase):
     def test_getOne(self):
index a145c00..cb76784 100644 (file)
@@ -7,6 +7,7 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 import unittest
+import copy
 
 from test_base import TestBase
 from opnfv_testapi.resources.testcase_models import TestcaseCreateRequest, \
@@ -168,6 +169,13 @@ class TestCaseUpdate(TestCaseBase):
         self.assertEqual(_id, new_body._id)
         self.assert_update_body(self.req_d, new_body, self.update_e)
 
+    def test_with_dollar(self):
+        self.create_d()
+        update = copy.deepcopy(self.update_d)
+        update.description = {'2. change': 'dollar change'}
+        code, body = self.update(update, self.req_d.name)
+        self.assertEqual(code, HTTP_OK)
+
 
 class TestCaseDelete(TestCaseBase):
     def test_notFound(self):