Merge "Bottlenecks: add project to the docker build/push job"
authorMatthewLi <matthew.lijun@huawei.com>
Thu, 14 Apr 2016 02:26:10 +0000 (02:26 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Thu, 14 Apr 2016 02:26:10 +0000 (02:26 +0000)
jjb/apex/apex.yml
jjb/bottlenecks/bottlenecks-ci-jobs.yml
jjb/functest/functest-ci-jobs.yml
jjb/opnfv/opnfv-lint.yml [new file with mode: 0644]
jjb/opnfv/slave-params.yml
jjb/releng-macros.yaml

index ce60ed3..b48e81e 100644 (file)
               OPNFV_CLEAN=yes
             git-revision: false
             block: true
+        - trigger-builds:
+          - project: 'functest-apex-{slave}-suite-{stream1}'
+            predefined-parameters: |
+              DEPLOY_SCENARIO=os-nosdn-nofeature-ha
+              FUNCTEST_SUITE_NAME=vping_userdata
+            block: true
         - 'apex-workspace-cleanup'
 
 - job-template:
index 09b7df1..415cdf3 100644 (file)
@@ -86,6 +86,9 @@
         - '{pod}-defaults'
         - '{installer}-defaults'
         - 'bottlenecks-params-{pod}'
+        - string:
+            name: DEPLOY_SCENARIO
+            default: 'os-odl_l2-nofeature-ha'
         - string:
             name: GERRIT_REFSPEC_DEBUG
             default: 'false'
index 57f4810..af79fbf 100644 (file)
@@ -67,7 +67,7 @@
         - intel-pod8:
             installer: compass
             <<: *master
-        - opnfv-jump-1:
+        - intel-pod7:
             installer: apex
             <<: *master
         - ericsson-pod1:
                 - 'promise'
                 - 'doctor'
                 - 'vims'
-                - 'vping'
+                - 'vping_userdata'
+                - 'vping_ssh'
 - parameter:
     name: functest-parameter
     parameters:
diff --git a/jjb/opnfv/opnfv-lint.yml b/jjb/opnfv/opnfv-lint.yml
new file mode 100644 (file)
index 0000000..aeea34e
--- /dev/null
@@ -0,0 +1,64 @@
+########################
+# Job configuration for opnfv-lint
+########################
+- project:
+
+    name: opnfv-lint
+
+    project: opnfv-lint
+
+    jobs:
+        - 'opnfv-lint-verify-{stream}'
+
+    stream:
+        - master:
+            branch: '{stream}'
+            gs-pathname: ''
+        - brahmaputra:
+            branch: 'stable/{stream}'
+            gs-pathname: '/{stream}'
+
+########################
+# job templates
+########################
+
+- job-template:
+    name: 'opnfv-lint-verify-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: $GERRIT_PROJECT
+        - gerrit-parameter:
+            branch: '{branch}'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    triggers:
+        - gerrit:
+            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: 'REG_EXP'
+                project-pattern: 'functest'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: ANT
+                    pattern: '**/*.py'
+
+    builders:
+        - lint-python-code
+        - report-lint-result-to-gerrit
index 8ee4b0b..e7f063c 100644 (file)
             default: ext-net;flat;10.6.15.5;10.6.15.250;10.6.15.254;10.6.15.0/24
             description: "External network to create for pod6 (name;type;first ip;last ip; gateway;network)"
 
+- parameter:
+    name: 'intel-pod7-defaults'
+    parameters:
+        - node:
+            name: SLAVE_NAME
+            description: 'Slave name on Jenkins'
+            allowed-slaves:
+                - intel-pod7
+            default-slaves:
+                - intel-pod7
+        - string:
+            name: INSTALLER_VERSION
+            default: latest
+            description: 'Version of the installer to deploy'
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: 'Git URL to use on this Jenkins Slave'
+        - string:
+            name: SSH_KEY
+            default: /root/.ssh/id_rsa
+            description: 'SSH key to use for Apex'
+
 - parameter:
     name: 'intel-pod8-defaults'
     parameters:
index 8c1539c..23d174a 100644 (file)
 
             deactivate
 
+- builder:
+    name: lint-python-code
+    builders:
+        - shell: |
+            #!/bin/bash
+            set -o errexit
+            set -o pipefail
+            set -o xtrace
+            export PATH=$PATH:/usr/local/bin/
+
+            virtualenv -p python2.7 $WORKSPACE/releng_flake8
+            source $WORKSPACE/releng_flake8/bin/activate
+
+            # install python packages
+            pip install flake8
+
+            # generate and upload lint log
+            echo "Running flake8 code on $PROJECT ..."
+
+            echo -e "Flake8 Violations\n-----------------" >> lint.log
+            find . \
+                -path './releng_flake8' -prune -o \
+                -type f -name "*.py" -print | \
+                xargs flake8 --exit-zero --first >> lint.log
+
+            deactivate
+
+- builder:
+    name: report-lint-result-to-gerrit
+    builders:
+        - shell: |
+            #!/bin/bash
+            set -o errexit
+            set -o pipefail
+            set -o xtrace
+            export PATH=$PATH:/usr/local/bin/
+            if [[ -e lint.log ]] ; then
+                sed -r -i 's/^/ /g' lint.log
+                echo -e "\nposting linting report to gerrit...\n"
+                cat lint.log
+                echo
+                ssh -p 29418 gerrit.opnfv.org \
+                    "gerrit review -p $GERRIT_PROJECT \
+                     -m \"$(cat lint.log)\" \
+                     $GERRIT_PATCHSET_REVISION"
+            fi
+
 - builder:
     name: upload-review-docs
     builders: