add gerrit debug/recheck/reverify func for bottlenecks jjb 41/5441/2
authorMatthewLi <matthew.lijun@huawei.com>
Mon, 4 Jan 2016 07:58:09 +0000 (02:58 -0500)
committerMatthewLi <matthew.lijun@huawei.com>
Mon, 4 Jan 2016 08:41:13 +0000 (03:41 -0500)
JIRA: BOTTLENECK-4

Change-Id: I0aaf66790ac9d93e60d7e3ae5b7c4fdbba6a0f54
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
jjb/bottlenecks/bottlenecks.yml

index 46fb12a..f311424 100644 (file)
             name: INSTALLER_IP
             default: '{installer_ip}'
             description: "Installer IP."
+        - string:
+            name: GERRIT_REFSPEC_DEBUG
+            default: ''
+            description: "Gerrit refspec for debug."
 
     scm:
         - git-scm:
 
     builders:
         - 'bottlenecks-fetch-os-creds'
-        #- 'run-rubbos-env-preparation'
-        - 'bottlenecks-instance-creation'
-        #- 'run-rubbos-tools-installation'
-        #- 'rubbos-exec'
+        - 'bottlenecks-run-rubbos'
 
     publishers:
         - email:
-            recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com
+            recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com liangqi1@huawei.com
 
 ####################
 # parameter macros
             !include-raw ../../utils/fetch_os_creds.sh
 
 - builder:
-    name: run-rubbos-env-preparation
-    builders:
-        - shell: |
-            #!/bin/bash
-            set -o errexit
-
-            echo "Bottlenecks: export openstack parameters before rubbos running"
-
-            cd $WORKSPACE
-            ./rubbos/rubbos_scripts/1-1-1/scripts/env_preparation.sh
-
-- builder:
-    name: bottlenecks-instance-creation
-    builders:
-        - shell: |
-            #!/bin/bash
-            set -o errexit
-
-            echo "Bottlenecks: instance creation by using heat template"
-            cd $WORKSPACE
-            ./utils/infra_setup/heat_template/HOT_create_instance.sh
-
-- builder:
-    name: run-rubbos-tools-installation
-    builders:
-        - shell: |
-            #!/bin/bash
-            set -o errexit
-
-            echo "Bottlenecks: to install tools to run rubbos"
-
-            cd $WORKSPACE
-            cd rubbos/rubbos_scripts/1-1-1
-            source set_bottlenecks_rubbos_env.sh
-            ./rubbos/rubbos_scripts/1-1-1/scripts/run.sh
-
-- builder:
-    name: rubbos-exec
+    name: bottlenecks-run-rubbos
     builders:
         - shell: |
             #!/bin/bash
             set -o errexit
 
-            echo "Bottlenecks: rubbos execution"
-
+            echo "Bottlenecks: rubbos running now..."
             cd $WORKSPACE
-            cd ./rubbos/rubbos_scripts/1-1-1
-            source set_bottlenecks_rubbos_env.sh
-            ssh $CONTROL_HOST
-            ./tmp/CONTROL_rubbos_exec.sh
+            ./ci/run.sh $GERRIT_REFSPEC_DEBUG
 
 - builder:
     name: bottlenecks-builder-upload-artifact
 - trigger:
     name: 'bottlenecks-trigger-lf'
     triggers:
-        - timed: '@midnight'
+        - timed: '0 16 * * *'
+        - 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: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**|.gitignore'