Merge "fuel: Specify upstream/opnfv branches separately and use include scripts"
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 7 Oct 2016 05:58:06 +0000 (05:58 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Fri, 7 Oct 2016 05:58:06 +0000 (05:58 +0000)
jjb/fuel/fuel-plugin-build.sh [new file with mode: 0755]
jjb/fuel/fuel-plugin-test.sh [new file with mode: 0755]
jjb/fuel/fuel-plugin-verify-jobs.yml

diff --git a/jjb/fuel/fuel-plugin-build.sh b/jjb/fuel/fuel-plugin-build.sh
new file mode 100755 (executable)
index 0000000..f7f613d
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then
+    JOB_TYPE=${BASH_REMATCH[0]}
+else
+    echo "Unable to determine job type!"
+    exit 1
+fi
+
+echo "Not activated!"
diff --git a/jjb/fuel/fuel-plugin-test.sh b/jjb/fuel/fuel-plugin-test.sh
new file mode 100755 (executable)
index 0000000..f7f613d
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then
+    JOB_TYPE=${BASH_REMATCH[0]}
+else
+    echo "Unable to determine job type!"
+    exit 1
+fi
+
+echo "Not activated!"
index cb20955..4fea26b 100644 (file)
@@ -9,7 +9,8 @@
 #####################################
     stream:
         - master:
-            branch: '{stream}'
+            upstream-branch: '{stream}'
+            opnfv-branch: 'experimental'
             gs-pathname: ''
             disabled: false
 #####################################
             max-total: 4
             option: 'project'
 
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{upstream-branch}'
+            description: 'OpenStack branch to use'
+        - string:
+            name: OPNFV_BRANCH
+            default: '{opnfv-branch}'
+            description: 'OPNFV branch to use'
+        - 'opnfv-build-defaults'
+        - 'fuel-verify-plugin-defaults':
+            gs-pathname: '{gs-pathname}'
+
     scm:
         - git:
             url: 'https://git.openstack.org/$GERRIT_PROJECT'
                 project-pattern: 'openstack/fuel-plugin-bgpvpn'
                 branches:
                   - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
+                    branch-pattern: '**/{upstream-branch}'
                 forbidden-file-paths:
                   - compare-type: ANT
                     pattern: 'README.md|.gitignore|.gitreview'
                 project-pattern: 'openstack/fuel-plugin-onos'
                 branches:
                   - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
+                    branch-pattern: '**/{upstream-branch}'
                 forbidden-file-paths:
                   - compare-type: ANT
                     pattern: 'README.md|.gitignore|.gitreview'
             readable-message: true
 
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: '{branch}'
-        - 'opnfv-build-defaults'
-        - 'fuel-verify-plugin-defaults':
-            gs-pathname: '{gs-pathname}'
-
     builders:
         - description-setter:
             description: "Built on $NODE_NAME"
                 - 'fuel-verify-plugin-test-.*'
             block-level: 'NODE'
 
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{upstream-branch}'
+            description: 'OpenStack branch to use'
+        - string:
+            name: OPNFV_BRANCH
+            default: '{opnfv-branch}'
+            description: 'OPNFV branch to use'
+        - '{slave-label}-defaults'
+        - '{installer}-defaults'
+        - 'fuel-verify-plugin-defaults':
+            gs-pathname: '{gs-pathname}'
+
     scm:
         - git:
             url: 'https://git.openstack.org/$GERRIT_PROJECT'
         - timeout:
             timeout: 360
             fail: true
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: '{branch}'
-        - '{slave-label}-defaults'
-        - '{installer}-defaults'
-        - 'fuel-verify-plugin-defaults':
-            gs-pathname: '{gs-pathname}'
 
     builders:
         - description-setter:
 - builder:
     name: 'fuel-verify-plugin-build-macro'
     builders:
-        - shell: |
-            #!/bin/bash
-
-            echo "Not activated!"
+        - shell:
+            !include-raw: ./fuel-plugin-build.sh
 
 - builder:
     name: 'fuel-verify-plugin-test-macro'
     builders:
-        - shell: |
-            #!/bin/bash
-
-            echo "Not activated!"
+        - shell:
+            !include-raw: ./fuel-plugin-test.sh
 #####################################
 # parameter macros
 #####################################