Move apex build jobs into 'apex-project-jobs' file 19/40519/2
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Mon, 28 Aug 2017 20:12:32 +0000 (13:12 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Fri, 1 Sep 2017 17:43:49 +0000 (10:43 -0700)
Since these jobs don't deal with scenarios they can safely be moved to
another file without the need to duplicate the scenario listings.

Fixes a bug with 'concurrent-builds' not being set due to missing
quotation marks.

JIRA: RELENG-287

Change-Id: Icce39620521c7d25476553115efbaa9063ca2e17
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
jjb/apex/apex-project-jobs.yml [new file with mode: 0644]
jjb/apex/apex.yml
jjb/apex/apex.yml.j2

diff --git a/jjb/apex/apex-project-jobs.yml b/jjb/apex/apex-project-jobs.yml
new file mode 100644 (file)
index 0000000..973ad91
--- /dev/null
@@ -0,0 +1,127 @@
+---
+- project:
+    name: 'apex-project-jobs'
+    project: 'apex'
+
+    stream:
+      - master: &master
+          branch: 'master'
+          gs-pathname: ''
+          concurrent-builds: 3
+          disabled: false
+
+      - danube: &danube
+          branch: 'stable/danube'
+          gs-pathname: '/danube'
+          concurrent-builds: 1
+          disabled: true
+
+    jobs:
+      - 'apex-build-{stream}'
+      - 'apex-verify-iso-{stream}'
+
+# Build phase
+- job-template:
+    name: 'apex-build-{stream}'
+
+    # Job template for builds
+    #
+    # Required Variables:
+    #     stream:    branch with - in place of / (eg. stable)
+    #     branch:    branch (eg. stable)
+    node: 'apex-build-{stream}'
+
+    disabled: false
+
+    concurrent: true
+
+    parameters:
+      - '{project}-defaults'
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - apex-parameter:
+          gs-pathname: '{gs-pathname}'
+
+    scm:
+      - git-scm-gerrit
+
+    wrappers:
+      - timeout:
+          timeout: 150
+          fail: true
+
+    properties:
+      - logrotate-default
+      - throttle:
+          max-per-node: '{concurrent-builds}'
+          max-total: 10
+          option: 'project'
+      - build-blocker:
+          use-build-blocker: true
+          block-level: 'NODE'
+          blocking-jobs:
+            - 'apex-verify-iso-{stream}'
+
+    builders:
+      - 'apex-build'
+      - inject:
+          properties-content: ARTIFACT_TYPE=rpm
+      - 'apex-upload-artifact'
+
+# ISO verify job
+- job-template:
+    name: 'apex-verify-iso-{stream}'
+
+    # Job template for builds
+    #
+    # Required Variables:
+    #     stream:    branch with - in place of / (eg. stable)
+    #     branch:    branch (eg. stable)
+    node: 'apex-virtual-{stream}'
+
+    disabled: false
+
+    concurrent: true
+
+    parameters:
+      - project-parameter:
+          project: '{project}'
+          branch: '{branch}'
+      - apex-parameter:
+          gs-pathname: '{gs-pathname}'
+      - string:
+          name: GIT_BASE
+          default: https://gerrit.opnfv.org/gerrit/$PROJECT
+          description: "Used for overriding the GIT URL coming from parameters macro."
+
+    scm:
+      - git-scm
+
+    properties:
+      - logrotate-default
+      - throttle:
+          max-per-node: 1
+          max-total: 10
+          option: 'project'
+
+    builders:
+      - 'apex-iso-verify'
+      - inject:
+          properties-content: ARTIFACT_TYPE=iso
+      - 'apex-upload-artifact'
+
+########################
+# builder macros
+########################
+- builder:
+    name: 'apex-build'
+    builders:
+      - shell:
+          !include-raw: ./apex-build.sh
+
+- builder:
+    name: 'apex-iso-verify'
+    builders:
+      - shell:
+          !include-raw: ./apex-iso-verify.sh
index 82062c6..4070e20 100644 (file)
@@ -6,13 +6,11 @@
         - 'apex-verify-gate-{stream}'
         - 'apex-verify-unit-tests-{stream}'
         - 'apex-runner-cperf-{stream}'
-        - 'apex-build-{stream}'
         - 'apex-deploy-{platform}-{stream}'
         - 'apex-daily-master'
         - 'apex-daily-danube'
         - 'apex-csit-promote-daily-{stream}'
         - 'apex-fdio-promote-daily-{stream}'
-        - 'apex-verify-iso-{stream}'
         - 'apex-{scenario}-baremetal-{scenario_stream}'
         - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
         - 'apex-upload-snapshot'
@@ -27,7 +25,6 @@
             virtual-slave: 'apex-virtual-master'
             baremetal-slave: 'apex-baremetal-master'
             verify-scenario: 'os-odl-nofeature-ha'
-            concurrent-builds: 3
             scenario_stream: 'master'
 
         - danube: &danube
@@ -37,7 +34,6 @@
             virtual-slave: 'apex-virtual-danube'
             baremetal-slave: 'apex-baremetal-danube'
             verify-scenario: 'os-odl_l3-nofeature-ha'
-            concurrent-builds: 1
             scenario_stream: 'danube'
             disabled: true
 
                   abort-all-job: false
                   git-revision: false
 
-# Build phase
-- job-template:
-    name: 'apex-build-{stream}'
-
-    # Job template for builds
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-    node: '{build-slave}'
-
-    disabled: false
-
-    concurrent: true
-
-    parameters:
-        - '{project}-defaults'
-        - project-parameter:
-            project: '{project}'
-            branch: '{branch}'
-        - apex-parameter:
-            gs-pathname: '{gs-pathname}'
-
-    scm:
-        - git-scm-gerrit
-
-    wrappers:
-        - timeout:
-            timeout: 150
-            fail: true
-
-    properties:
-        - logrotate-default
-        - throttle:
-            max-per-node: {concurrent-builds}
-            max-total: 10
-            option: 'project'
-        - build-blocker:
-            use-build-blocker: true
-            block-level: 'NODE'
-            blocking-jobs:
-                - 'apex-verify-iso-{stream}'
-
-    builders:
-        - 'apex-build'
-        - inject:
-           properties-content: ARTIFACT_TYPE=rpm
-        - 'apex-upload-artifact'
-
-# ISO verify job
-- job-template:
-    name: 'apex-verify-iso-{stream}'
-
-    # Job template for builds
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-    node: '{virtual-slave}'
-
-    disabled: false
-
-    concurrent: true
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-            branch: '{branch}'
-        - apex-parameter:
-            gs-pathname: '{gs-pathname}'
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: "Used for overriding the GIT URL coming from parameters macro."
-
-    scm:
-        - git-scm
-
-    properties:
-        - logrotate-default
-        - throttle:
-            max-per-node: 1
-            max-total: 10
-            option: 'project'
-
-    builders:
-        - 'apex-iso-verify'
-        - inject:
-           properties-content: ARTIFACT_TYPE=iso
-        - 'apex-upload-artifact'
-
 # Deploy job
 - job-template:
     name: 'apex-deploy-{platform}-{stream}'
         - shell:
             !include-raw: ./apex-unit-test.sh
 
-- builder:
-    name: 'apex-build'
-    builders:
-        - shell:
-            !include-raw: ./apex-build.sh
-
 - builder:
     name: 'apex-workspace-cleanup'
     builders:
         - shell:
             !include-raw: ./apex-workspace-cleanup.sh
 
-- builder:
-    name: 'apex-iso-verify'
-    builders:
-        - shell:
-            !include-raw: ./apex-iso-verify.sh
-
 
 - builder:
     name: 'apex-upload-artifact'
index 16b0255..28b83e8 100644 (file)
@@ -6,13 +6,11 @@
         - 'apex-verify-gate-{stream}'
         - 'apex-verify-unit-tests-{stream}'
         - 'apex-runner-cperf-{stream}'
-        - 'apex-build-{stream}'
         - 'apex-deploy-{platform}-{stream}'
         - 'apex-daily-master'
         - 'apex-daily-danube'
         - 'apex-csit-promote-daily-{stream}'
         - 'apex-fdio-promote-daily-{stream}'
-        - 'apex-verify-iso-{stream}'
         - 'apex-{scenario}-baremetal-{scenario_stream}'
         - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
         - 'apex-upload-snapshot'
@@ -27,7 +25,6 @@
             virtual-slave: 'apex-virtual-master'
             baremetal-slave: 'apex-baremetal-master'
             verify-scenario: 'os-odl-nofeature-ha'
-            concurrent-builds: 3
             scenario_stream: 'master'
 
         - danube: &danube
@@ -37,7 +34,6 @@
             virtual-slave: 'apex-virtual-danube'
             baremetal-slave: 'apex-baremetal-danube'
             verify-scenario: 'os-odl_l3-nofeature-ha'
-            concurrent-builds: 1
             scenario_stream: 'danube'
             disabled: true
 
                   abort-all-job: false
                   git-revision: false
 
-# Build phase
-- job-template:
-    name: 'apex-build-{stream}'
-
-    # Job template for builds
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-    node: '{build-slave}'
-
-    disabled: false
-
-    concurrent: true
-
-    parameters:
-        - '{project}-defaults'
-        - project-parameter:
-            project: '{project}'
-            branch: '{branch}'
-        - apex-parameter:
-            gs-pathname: '{gs-pathname}'
-
-    scm:
-        - git-scm-gerrit
-
-    wrappers:
-        - timeout:
-            timeout: 150
-            fail: true
-
-    properties:
-        - logrotate-default
-        - throttle:
-            max-per-node: {concurrent-builds}
-            max-total: 10
-            option: 'project'
-        - build-blocker:
-            use-build-blocker: true
-            block-level: 'NODE'
-            blocking-jobs:
-                - 'apex-verify-iso-{stream}'
-
-    builders:
-        - 'apex-build'
-        - inject:
-           properties-content: ARTIFACT_TYPE=rpm
-        - 'apex-upload-artifact'
-
-# ISO verify job
-- job-template:
-    name: 'apex-verify-iso-{stream}'
-
-    # Job template for builds
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-    node: '{virtual-slave}'
-
-    disabled: false
-
-    concurrent: true
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-            branch: '{branch}'
-        - apex-parameter:
-            gs-pathname: '{gs-pathname}'
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: "Used for overriding the GIT URL coming from parameters macro."
-
-    scm:
-        - git-scm
-
-    properties:
-        - logrotate-default
-        - throttle:
-            max-per-node: 1
-            max-total: 10
-            option: 'project'
-
-    builders:
-        - 'apex-iso-verify'
-        - inject:
-           properties-content: ARTIFACT_TYPE=iso
-        - 'apex-upload-artifact'
-
 # Deploy job
 - job-template:
     name: 'apex-deploy-{platform}-{stream}'
         - shell:
             !include-raw: ./apex-unit-test.sh
 
-- builder:
-    name: 'apex-build'
-    builders:
-        - shell:
-            !include-raw: ./apex-build.sh
-
 - builder:
     name: 'apex-workspace-cleanup'
     builders:
         - shell:
             !include-raw: ./apex-workspace-cleanup.sh
 
-- builder:
-    name: 'apex-iso-verify'
-    builders:
-        - shell:
-            !include-raw: ./apex-iso-verify.sh
-
 
 - builder:
     name: 'apex-upload-artifact'